Skip to content

Commit

Permalink
Run less tests on pull requests and push
Browse files Browse the repository at this point in the history
Solves #2044
  • Loading branch information
Aratz committed Nov 25, 2022
1 parent ffdae0d commit 452f243
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,25 @@ concurrency:
cancel-in-progress: true

jobs:
pytest:
select-strategy:
runs-on: ubuntu-latest
outputs:
python-versions: ${{ steps.set-matrix.outputs.python-versions }}
steps:
- id: set-matrix
run: |
if [ ${{ github.event_name }} == "release" ]; then
echo "python-versions=[\"3.7\",\"3.8\",\"3.9\",\"3.10\",\"3.11\"]" >> $GITHUB_OUTPUT
else
echo "python-versions=[\"3.7\",\"3.11\"]" >> $GITHUB_OUTPUT
fi
pytest:
needs: select-strategy
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

python-version: ${{ fromJson(needs.select-strategy.outputs.python-versions) }}
os: [ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
name: Check out source-code repository
Expand Down

0 comments on commit 452f243

Please sign in to comment.