Skip to content

Commit 786461d

Browse files
feat: add GitHub Actions workflow for running tests and uploading coverage.
1 parent 62e3f1d commit 786461d

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run tests and upload coverage
2+
3+
on: push
4+
5+
jobs:
6+
test:
7+
name: Run tests and collect coverage
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 2
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v6
17+
with:
18+
python-version: "3.13"
19+
cache: "uv"
20+
21+
- name: Install dependencies
22+
run: uv pip install -e .[dev]
23+
24+
- name: Run tests with coverage
25+
run: uv run pytest --cov --cov-branch --cov-report=xml
26+
27+
- name: Upload coverage to Codecov
28+
uses: codecov/codecov-action@v5
29+
with:
30+
token: ${{ secrets.CODECOV_TOKEN }}
31+
slug: ${{ github.repository }}

0 commit comments

Comments
 (0)