diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac573bf..0181fa4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,12 @@ on: - main jobs: tests: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.10", "3.11", "3.12", "3.13"] env: # secrets cannot be referenced in step `if:` (schema); expose a boolean via env instead. HAS_BOT_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN != '' }} @@ -20,19 +25,21 @@ jobs: uses: astral-sh/setup-uv@v6 with: version: "0.6.6" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: uv sync - name: Run tests with coverage run: uv run pytest tests --verbose --cov=winnow --cov-report xml:coverage.xml --cov-report term-missing --junitxml=pytest.xml --cov-fail-under=0 - name: pytest coverage comment id: coverageComment + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' uses: MishaKav/pytest-coverage-comment@287292879eaaff04116f36d3eb1a670f6e5df1a4 with: pytest-xml-coverage-path: ./coverage.xml junitxml-path: ./pytest.xml # Dependabot (and some fork PRs) do not receive Actions secrets; skip gist update to avoid 401. - name: Create the badge - if: env.HAS_BOT_TOKEN == 'true' + if: env.HAS_BOT_TOKEN == 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 with: auth: ${{ secrets.BOT_ACCESS_TOKEN }}