Skip to content

Commit da2c7be

Browse files
committed
Add a action file to run coverage and upload the results
1 parent 22cb0ad commit da2c7be

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Code Coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ['3.13']
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -e '.[dev]'
23+
- name: Generate coverage report
24+
run: coverage run -m pytest -v && coverage xml
25+
- name: Upload report to Codecov
26+
uses: codecov/codecov-action@v5
27+
with:
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
fail_ci_if_error: true
30+
files: ./coverage.xml
31+

0 commit comments

Comments
 (0)