From 8d16ab155ae905aced9581b3a738a8b29eb65993 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 9 Jun 2022 00:18:49 -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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index b94d5e0..fe800bf 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -7,6 +7,7 @@ on: push: branches: [ "main" ] pull_request: + types: [opened, reopened, synchronize, ready_for_review] branches: [ "main" ] permissions: @@ -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'