Skip to content

Commit

Permalink
Use exclude instead of include to reduce matrix;
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Oct 10, 2023
1 parent 9a225b4 commit 98f66e5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
# Get the oldest supported version from the pyproject.toml
OLDEST=$(rg -No '"ruff>=(.*)"' -r '$1' pyproject.toml)
echo "::set-output name=versions::[\"$OLDEST\", \"$LATEST\"]"
echo "::set-output name=oldest::$OLDEST
echo "::set-output name=latest::$LATEST
outputs:
versions: ${{ steps.set-versions.outputs.versions }}
oldest: ${{ steps.set-versions.outputs.oldest }}
latest: ${{ steps.set-versions.outputs.latest }}
test:
Expand All @@ -59,12 +60,16 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
ruff-version: ["${{ needs.ruff-versions.outputs.latest }}"]
ruff-version: ${{ fromJson(needs.ruff-versions.outputs.versions) }}
os: [ubuntu-latest, macos-latest, windows-latest]

include:
- os: ubuntu-latest
ruff-version: ${{ needs.ruff-versions.outputs.oldest }}
exclude:
- ruff-version: ${{ needs.ruff-versions.outputs.latest }}
os: windows-latest

- ruff-version: ${{ needs.ruff-versions.outputs.latest }}
os: macos-latest


runs-on: ${{ matrix.os }}
steps:
Expand Down

0 comments on commit 98f66e5

Please sign in to comment.