Skip to content

Commit

Permalink
ci: fix matrix conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
farioas committed Mar 19, 2024
1 parent ef57a90 commit 9da4211
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,8 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: ['3.8', '3.9', '3.10', '3.11']
test-command: poetry run pytest --junitxml report.xml --cov=. -vv
- os: windows-latest
python-version: ['3.8', '3.9', '3.10', '3.11']
test-command: poetry run pytest -vv
os: [ ubuntu-latest, windows-latest ]
version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4
Expand All @@ -69,12 +64,18 @@ jobs:
- name: Install Python dependencies
run: poetry install

- name: Run tests
- name: Run tests without coverage
if: ${{ matrix.os != 'ubuntu-latest' && matrix.python-version != '3.11' }}
working-directory: tests/
run: ${{ matrix.test-command }}
run: poetry run pytest --junitxml report.xml --cov=. -vv

- name: Run tests with coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
working-directory: tests/
run: poetry run pytest --junitxml report.xml --cov=. -vv

- name: Upload to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
uses: codecov/[email protected]
with:
files: tests/coverage.xml
Expand Down

0 comments on commit 9da4211

Please sign in to comment.