Skip to content

Commit

Permalink
Merge 'github: Use only Python 3.13 for pull request runs' from Pekka…
Browse files Browse the repository at this point in the history
… Enberg

...speeds up PR cycle time by not running on all the possible Python
configurations all the time.

Reviewed-by: Pere Diaz Bou <[email protected]>

Closes #840
penberg committed Jan 31, 2025
2 parents 7f0274e + 3398252 commit e96b649
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -15,19 +15,28 @@ env:
PIP_DISABLE_PIP_VERSION_CHECK: "true"

jobs:
configure-strategy:
runs-on: ubuntu-latest
outputs:
python-versions: ${{ steps.gen-matrix.outputs.python-versions }}
steps:
- id: gen-matrix
run: |
if [ ${{ github.event_name }} == "pull_request" ]; then
echo "python-versions=[\"3.13\"]" >> $GITHUB_OUTPUT
else
echo "python-versions=[\"3.9\",\"3.10\",\"3.11\",\"3.12\",\"3.13\"]" >> $GITHUB_OUTPUT
fi
test:
needs: configure-strategy
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
python-version: ${{ fromJson(needs.configure-strategy.outputs.python-versions) }}
runs-on: ${{ matrix.os }}

defaults:

0 comments on commit e96b649

Please sign in to comment.