Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '' }}
Expand All @@ -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 }}
Expand Down
Loading