Skip to content

Commit

Permalink
[CI] Generate Python coverage data for Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and bryanwweber committed Aug 11, 2022
1 parent 20aa58c commit a44908a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .codecov.yml
Expand Up @@ -7,3 +7,6 @@ coverage:
comment:
behavior: once
require_changes: yes

fixes:
- "build/python/::interfaces/cython/"
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Expand Up @@ -155,7 +155,7 @@ jobs:
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: python3 -m pip install ruamel.yaml scons numpy cython h5py pandas scipy pytest
pytest-github-actions-annotate-failures gcovr
pytest-github-actions-annotate-failures pytest-cov gcovr
- name: Build Cantera
run: |
python3 `which scons` build blas_lapack_libs=lapack,blas coverage=y \
Expand All @@ -177,10 +177,10 @@ jobs:
path: htmlcoverage*
retention-days: 5
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
verbose: true
files: ./coverage.xml
files: ./coverage.xml,./build/pycov.xml
fail_ci_if_error: true

example-keywords:
Expand Down
6 changes: 5 additions & 1 deletion test/python/runCythonTests.py
Expand Up @@ -89,7 +89,11 @@
if fast_fail:
pytest_args.insert(0, "-x")
if coverage:
pytest_args.extend(["--cov=cantera", "--cov-config=test/python/coverage.ini"])
pytest_args.extend([
"--cov=cantera",
"--cov-config=test/python/coverage.ini",
"--cov-report=xml:build/pycov.xml"
])
if verbose:
pytest_args.insert(0, "-v")
else:
Expand Down

0 comments on commit a44908a

Please sign in to comment.