Release 25.8 #189
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Latest Python Support | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| # Collect available Python versions | |
| get-python-versions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| python-matrix: ${{ steps.trim.outputs.matrix }} | |
| steps: | |
| - uses: snok/latest-python-versions@v1 | |
| id: get-python-versions-action | |
| with: | |
| min-version: '3.12' | |
| # keep only major.minor and remove duplicates | |
| - name: Keep only major.minor | |
| id: trim | |
| shell: bash | |
| run: | | |
| versions='${{ steps.get-python-versions-action.outputs.latest-python-versions }}' | |
| # → ["3.13.5","3.12.11", ...] | |
| matrix=$(echo "$versions" \ | |
| | jq -c 'map(split(".")[:2] | join(".")) | unique') | |
| echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
| # Use the trimmed versions list in matrix | |
| test: | |
| needs: [get-python-versions] | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| matrix: | |
| operating-system: [ ubuntu-latest, windows-latest, macOS-latest ] | |
| python-version: ${{ fromJson(needs.get-python-versions.outputs.python-matrix) }} | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python on ${{ matrix.operating-system }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' # caching pip dependencies | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -r requirements.txt -r test-requirements.txt | |
| - name: Lint | |
| run: | | |
| python -m check_python_versions --expect 3.9- --only setup.py | |
| - name: Test | |
| env: | |
| TEST_CONFIGURATION_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }} | |
| run: python -Werror -m pytest |