Skip to content

Commit

Permalink
Fixed missing coverage data by setting coverage subprocess hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
kvrigor committed Oct 14, 2024
1 parent e23716e commit 6d4aedd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,15 @@ jobs:
mkdir pytest
cp mpi_tester.py pytest
# Coverage data is also collected during single process testing.
- name: Run single-process tests with Pytest
run: >-
coverage run
--rcfile=$GITHUB_WORKSPACE/pyproject.toml
--module pytest -n auto
--pyargs psydac -m "not parallel and not petsc"
run: |
export COVERAGE_PROCESS_START="pyproject.toml"
export PYTHONPATH=$(pwd)
echo "import coverage; coverage.process_startup()" > sitecustomize.py
coverage run --module pytest -n auto --pyargs psydac -m "not parallel and not petsc"
rm sitecustomize.py
unset COVERAGE_PROCESS_STARTPYTHONPATH
- name: Generate coverage report for Codacy
run: |
Expand Down

0 comments on commit 6d4aedd

Please sign in to comment.