From f65b70f9bd62deacaf1f6217dfaf655659a7bf9e Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 9 Jun 2022 10:05:18 -0400 Subject: [PATCH] :triangular_flag_on_post: Skip Ubuntu Python 3.9 CI tests for draft PRs Conserve GitHub Actions Continuous Integration resources when a Pull Request is in draft mode. --- .github/workflows/ci-tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index b0bd951..5d695a5 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -21,6 +21,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 Ubuntu-22.04/Python 3.9 include: - os: 'ubuntu-22.04'