Skip to content

Commit

Permalink
Updated more GitHub actions and improved test workflow
Browse files Browse the repository at this point in the history
The test step would mask any test failures on Windows due to `coverage xml` succeeding despite previous errors.
  • Loading branch information
agronholm committed Mar 10, 2024
1 parent 92921a0 commit 819baa3
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ jobs:
python-version: "pypy-3.10"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-test-${{ matrix.python-version }}-${{ matrix.os }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install the project
run: pip install --no-binary=wheel .
- name: Install test dependencies
Expand All @@ -48,12 +46,12 @@ jobs:
if: matrix.python-version == '3.12'
run: pip install build flit
- name: Test with pytest
run: |
coverage run -m pytest
coverage xml
run: coverage run -m pytest -v
env:
PYTHONWARNDEFAULTENCODING: 1
- name: Generate coverage report
run: coverage xml
- name: Send coverage data to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: coverage.xml

0 comments on commit 819baa3

Please sign in to comment.