Skip to content

Commit 3396eb9

Browse files
committed
Add GitHub Actions CI for tests
1 parent b135db7 commit 3396eb9

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-version: ["3.9", "3.10", "3.11", "3.12"]
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install uv
30+
uv pip install -e ".[dev]"
31+
uv pip install pytest pytest-cov
32+
33+
- name: Run tests
34+
run: |
35+
uv run pytest --cov --cov-branch --cov-report=xml
36+
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v5
39+
with:
40+
files: ./coverage.xml
41+
fail_ci_if_error: true

0 commit comments

Comments
 (0)