Skip to content

Commit

Permalink
Use -P option to avoid that the source directory path gets automatica…
Browse files Browse the repository at this point in the history
…lly added to sys.path while running pytest, since the multiphenicsx package should be loaded from the installation directory rather than the source one
  • Loading branch information
francesco-ballarin committed Oct 29, 2023
1 parent f78a463 commit 91429d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
cd docs && make html
- name: Run unit tests (serial)
run: |
COVERAGE_FILE=.coverage_unit_serial python3 -m coverage run --source=multiphenicsx -m pytest tests/unit
COVERAGE_FILE=.coverage_unit_serial python3 -P -m coverage run --source=multiphenicsx -m pytest tests/unit
- name: Run unit tests (parallel)
run: |
COVERAGE_FILE=.coverage_unit_parallel mpirun -n 2 python3 -m coverage run --source=multiphenicsx --parallel-mode -m pytest tests/unit
COVERAGE_FILE=.coverage_unit_parallel mpirun -n 2 python3 -P -m coverage run --source=multiphenicsx --parallel-mode -m pytest tests/unit
- name: Combine coverage reports
run: |
python3 -m coverage combine .coverage*
Expand All @@ -77,10 +77,10 @@ jobs:
pattern: "tutorials/**/*.ipynb"
- name: Run tutorials (serial)
run: |
python3 -m pytest tutorials
python3 -P -m pytest tutorials
- name: Run tutorials (parallel)
run: |
python3 -m pytest --np 2 tutorials
python3 -P -m pytest --np 2 tutorials
- name: Upload tutorials logs as an artifact in case of failure
if: failure() || cancelled()
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 91429d0

Please sign in to comment.