Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Only run trial CI on all python versions on non-PRs #13698

Merged
merged 5 commits into from
Sep 2, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Try another tactic
  • Loading branch information
erikjohnston committed Sep 1, 2022
commit 50bc114c345d3eaabe0bab2a37aa2f4a4116d656
30 changes: 10 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,33 +73,23 @@ jobs:
steps:
- run: "true"

trial-python-versions:
name: "Calculate list of python versions to run trial against"
needs: linting-done
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: set-pythons
run: |
# Only run oldest and latest support versions for PRs.
pythons='["3.7", "3.10"]'
if [[ $GITHUB_REF != refs/pull/* ]]; then
pythons='["3.7", "3.8", "3.9" "3.10"]'
fi
echo "::set-output name=pythons::$dists"
# map the step outputs to job outputs
outputs:
pythons: ${{ steps.set-pythons.outputs.pythons }}

trial:
if: ${{ !cancelled() && !failure() }} # Allow previous steps to be skipped, but not fail
needs: trial-python-versions
needs: linting-done
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ${{ fromJson(trial-python-versions.pythons) }}
python-version: ["3.7", "3.8", "3.9", "3.10"]
database: ["sqlite"]
extras: ["all"]
is_pr:
- ${{ startsWith(github.ref, 'refs/pull/') }}
exclude:
- is_pr: true
python-version: 3.8
- is_pr: true
python-version: 3.9

include:
# Newest Python without optional deps
- python-version: "3.10"
Expand Down