Skip to content

Commit 5c5f28b

Browse files
committed
#24 Add GitHub Actions CI workflow
Runs lint (ruff check + format) and tests (pytest with coverage) on pull requests to develop and main branches.
1 parent 8007c5f commit 5c5f28b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [develop, main]
6+
7+
jobs:
8+
lint:
9+
name: Lint & Format
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
18+
- name: Install Ruff
19+
run: pip install ruff>=0.9.0
20+
21+
- name: Ruff check
22+
run: ruff check .
23+
24+
- name: Ruff format check
25+
run: ruff format --check .
26+
27+
test:
28+
name: Test & Coverage
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.12"
36+
cache: pip
37+
38+
- name: Install dependencies
39+
run: |
40+
pip install --upgrade pip
41+
pip install fastapi uvicorn python-multipart python-dotenv
42+
pip install pytest pytest-asyncio httpx pytest-cov
43+
44+
- name: Run tests with coverage
45+
run: pytest --cov --cov-report=term-missing --cov-fail-under=80

0 commit comments

Comments
 (0)