Skip to content

Commit 0a53851

Browse files
authored
Add Codecov workflow for coverage reporting
1 parent fe0c1b7 commit 0a53851

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Code Coverage
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
10+
- name: Set up Python
11+
uses: actions/setup-python@v4
12+
with:
13+
python-version: '3.10'
14+
15+
- name: Install dependencies
16+
run: |
17+
pip install pytest pytest-cov
18+
19+
- name: Run tests and generate coverage
20+
run: pytest --cov=. --cov-report=xml
21+
22+
- name: Upload coverage to Codecov
23+
uses: codecov/codecov-action@v5
24+
with:
25+
token: ${{ secrets.CODECOV_TOKEN }}
26+
file: ./coverage.xml
27+
flags: unittests
28+
name: codecov-umbrella
29+
fail_ci_if_error: true
30+
verbose: true

0 commit comments

Comments
 (0)