Skip to content

Commit 7ec1cb8

Browse files
authored
Merge pull request #123 from mbooz-rh/RHELDST-40410
Onboard test coverage to Codecov [RHELDST-40410]
2 parents e29d8a2 + 31bb2ec commit 7ec1cb8

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,34 @@ jobs:
2626
- name: Run tests
2727
run: |
2828
tox
29+
30+
cov:
31+
runs-on: ubuntu-latest
32+
33+
permissions:
34+
id-token: write
35+
36+
steps:
37+
- uses: actions/checkout@v3
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: "3.9"
43+
44+
- name: Install dependencies
45+
run: |
46+
python -m pip install -U pip
47+
pip install tox
48+
49+
- name: Run tests
50+
run: |
51+
tox -e cov
52+
53+
- name: Upload coverage to Codecov
54+
uses: codecov/codecov-action@v5
55+
with:
56+
use_oidc: true
57+
flags: unit-tests
58+
files: coverage.xml
59+
fail_ci_if_error: false

tox.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ commands =
2929
commands =
3030
poetry install -v
3131
poetry run sphinx-build -M html docs docs/_build
32+
33+
[testenv:cov]
34+
deps = poetry
35+
skip_install = True
36+
commands =
37+
poetry install -v
38+
poetry run py.test -v --cov-report html --cov-report xml {posargs}

0 commit comments

Comments
 (0)