From ec79cc39fb438999a965d100f093202b264112ac Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 9 Jun 2022 10:17:08 -0400 Subject: [PATCH] :triangular_flag_on_post: Skip Ubuntu Python 3.8 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 31f456f..dd60841 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 }} + # 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'