Skip to content

Commit

Permalink
🚩 Skip Ubuntu Python 3.8 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 8d0d8dd commit 63114cd
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, ready_for_review, reopened, synchronize]
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 }}
# Exclude Ubuntu + Python 3.8 job for draft PRs
exclude:
- python-version: '3.8'
isDraft: true
# Only install optional packages on Ubuntu-22.04/Python 3.9
include:
- os: 'ubuntu-22.04'
Expand Down

0 comments on commit 63114cd

Please sign in to comment.