Skip to content

Commit 09d6293

Browse files
committed
Onboard test coverage to Codecov
Update testenv to generate coverage.xml report Adds the codecov action to the run-ci workflow in ci.yml
1 parent e29d8a2 commit 09d6293

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
run-ci:
1111
runs-on: ubuntu-latest
1212

13+
permissions:
14+
id-token: write
15+
1316
steps:
1417
- uses: actions/checkout@v3
1518

@@ -26,3 +29,11 @@ jobs:
2629
- name: Run tests
2730
run: |
2831
tox
32+
33+
- name: Upload coverage to Codecov
34+
uses: codecov/codecov-action@v5
35+
with:
36+
use_oidc: true
37+
flags: unit-tests
38+
files: coverage.xml
39+
fail_ci_if_error: false

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ deps = poetry
88
skip_install = True
99
commands =
1010
poetry install -v
11-
poetry run py.test -v --cov repo_autoindex --cov-fail-under 100 --cov-report html {posargs}
11+
poetry run py.test -v --cov repo_autoindex --cov-fail-under 100 --cov-report html --cov-report xml {posargs}
1212

1313
[testenv:mypy]
1414
commands =

0 commit comments

Comments
 (0)