Skip to content

Commit cb93286

Browse files
authored
Add coverage reporting (#45)
1 parent 9a966e0 commit cb93286

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
fail-fast: false
4747
matrix:
4848
include:
49-
- os: ubuntu-latest
5049
- os: ubuntu-24.04-arm
5150
- os: windows-latest
5251
- os: macos-latest
@@ -58,6 +57,27 @@ jobs:
5857
- uses: ./.github/actions/setup_rye
5958
- run: rye test -a
6059

60+
pytest-cov:
61+
name: Run tests and collect coverage
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v4
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v5
69+
70+
- name: Setup rye
71+
uses: ./.github/actions/setup_rye
72+
73+
- name: Run tests
74+
run: rye test -a -- --cov --cov-branch --cov-report=xml
75+
76+
- name: Upload results to Codecov
77+
uses: codecov/codecov-action@v5
78+
with:
79+
token: ${{ secrets.CODECOV_TOKEN }}
80+
6181
docs:
6282
name: Documentation build
6383
runs-on: ubuntu-latest
@@ -78,6 +98,7 @@ jobs:
7898
- pre-commit
7999
- mypy
80100
- pytest
101+
- pytest-cov
81102
- docs
82103

83104
runs-on: ubuntu-latest

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ requirements-dev.lock
1919

2020
# rye is the primary tool, uv is only used for on-the-fly setups
2121
uv.lock
22+
23+
# coverage files
24+
.coverage
25+
coverage.xml

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ repos:
2121
hooks:
2222
- id: taplo-format
2323
# lint fetches schemas online at each call, deactivate for now
24-
- id: taplo-lint
24+
# - id: taplo-lint # excluded because json is fetched online and not reachable (503)

0 commit comments

Comments
 (0)