Skip to content

Commit

Permalink
Specify Python path with pipx run (#11)
Browse files Browse the repository at this point in the history
Apparently pipx run was using the system Python version instead of
the one set up by the action setup-python. This commit specifies
the exact Python path to run with pipx.

Also run the tests on Python 3.8, 3.9 and 3.10 and don't fail fast,
to find  version-specific failures sooner.
  • Loading branch information
koenvervloesem committed Dec 25, 2022
1 parent 2e227ff commit 29567b8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ jobs:
test:
needs: prepare
strategy:
fail-fast: false
matrix:
python:
- "3.7" # oldest Python supported by PSF
- 3.7 # oldest Python supported by PSF
- 3.8
- 3.9
- "3.10"
- "3.11" # newest Python that is stable
platform:
- ubuntu-latest
Expand All @@ -70,18 +74,22 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python }}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
- name: Run tests
run: >-
pipx run --spec tox==3.27.1 tox
pipx run --verbose --python '${{ steps.setup-python.outputs.python-path }}'
--spec tox==3.27.1 tox
--installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
-- -rFEx --durations 10 --color yes
- name: Generate coverage report
run: pipx run coverage lcov -o coverage.lcov
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
coverage lcov -o coverage.lcov
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3

Expand Down

0 comments on commit 29567b8

Please sign in to comment.