Skip to content

Commit

Permalink
Run tests on original source code, rather than installing the package…
Browse files Browse the repository at this point in the history
… into the python environment.

This ensures coverage report has files listed with paths relative to the repository root.
  • Loading branch information
LincolnPuzey committed Jun 4, 2023
1 parent 47df40f commit 6df0341
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Expand Up @@ -81,14 +81,17 @@ jobs:
- name: Install test requirements
run: |
python -m pip install --upgrade pip wheel
pip install django~=${{ matrix.django }}.0 coverage[toml]~=7.0 -r tests-requirements.txt .
pip install django~=${{ matrix.django }}.0 coverage[toml]~=7.0 -r tests-requirements.txt
python --version
pip list
- name: Run unit tests
run: coverage run -m pytest -v
env:
TEST_DATABASE: ${{ matrix.database }}
# Run tests on original source code, rather than installing the package into the python environment.
# This ensures coverage report has files listed with paths relative to the repository root.
PYTHONPATH: './src'

- name: Report coverage to console
run: coverage report
Expand Down

0 comments on commit 6df0341

Please sign in to comment.