Skip to content

Commit a5be4b8

Browse files
Merge pull request #79 from spiceoogway/add-ci-pipeline
devops: add CI pipeline with lint, test, and security audit
2 parents 665a750 + 8b76c50 commit a5be4b8

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.11"
18+
- name: Install ruff
19+
run: pip install ruff
20+
- name: Run ruff (errors only, no style nitpicks)
21+
run: ruff check . --select E,F,W --ignore E501,W291,W292,W293
22+
23+
test:
24+
name: Test
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.11"
31+
- name: Install dependencies
32+
run: |
33+
pip install -r requirements.txt
34+
pip install pytest pytest-cov
35+
- name: Run tests
36+
run: pytest -v --tb=short
37+
- name: Run tests with coverage
38+
run: pytest --cov=. --cov-report=term-missing --cov-fail-under=10
39+
# Start with 10% threshold — increase as tests are added (see #52)
40+
41+
security:
42+
name: Dependency audit
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: actions/setup-python@v5
47+
with:
48+
python-version: "3.11"
49+
- name: Install dependencies
50+
run: pip install -r requirements.txt pip-audit
51+
- name: Audit dependencies
52+
run: pip-audit

0 commit comments

Comments
 (0)