Skip to content

Commit

Permalink
🚩 Skip Ubuntu Python 3.9 CI tests for draft PRs
Browse files Browse the repository at this point in the history
Conserve GitHub Actions Continuous Integration resources when a Pull Request is in draft mode.
  • Loading branch information
weiji14 committed Jun 9, 2022
1 parent 37f3ba4 commit 8d16ab1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches: [ "main" ]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
branches: [ "main" ]

permissions:
Expand All @@ -21,6 +22,13 @@ jobs:
matrix:
python-version: ["3.8", "3.9"]
os: [ubuntu-22.04]
# Is it a draft Pull Request (true or false)?
isDraft:
- ${{ github.event.pull_request.draft }}
# Only run one job (Ubuntu + Python 3.8) for draft PRs
exclude:
- python-version: '3.9'
isDraft: true
# Only install optional packages on Python 3.9
include:
- python-version: '3.8'
Expand Down

0 comments on commit 8d16ab1

Please sign in to comment.