Skip to content

Commit

Permalink
Run tests differently on Windows and non-Windows systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
yaph committed Jun 28, 2024
1 parent c739620 commit b169dd4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
shell: bash
strategy:
fail-fast: false
matrix:
Expand All @@ -39,5 +38,12 @@ jobs:
- name: Run static analysis
run: hatch fmt --linter

- name: Run tests
- name: Run tests non-Windows
if: runner.os != 'Windows'
run: hatch test --python ${{ matrix.python-version }} --cover --randomize --parallel --retries 2 --retry-delay 1

- name: Run tests Windows
if: runner.os == 'Windows'
shell: cmd
run: |
python -c "import os; os.system('hatch test --python ${{ matrix.python-version }} --cover --randomize --parallel --retries 2 --retry-delay 1')"

0 comments on commit b169dd4

Please sign in to comment.