diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 7e745252b91..427879532c1 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -7,6 +7,7 @@ on: push: branches: [ master ] pull_request: + types: [opened, reopened, synchronize, ready_for_review] paths-ignore: - 'doc/**' - '*.md' @@ -29,6 +30,22 @@ jobs: matrix: python-version: [3.7, 3.8, 3.9] os: [ubuntu-latest, macOS-latest, windows-latest] + # Is it a draft Pull Request (true or false)? + isDraft: + - ${{ github.event.pull_request.draft }} + # Only run one job (Ubuntu + Python 3.9) for draft PRs + exclude: + - os: macOS-latest + isDraft: true + - os: windows-latest + isDraft: true + - os: ubuntu-latest + python-version: 3.7 + isDraft: true + - os: ubuntu-latest + python-version: 3.8 + isDraft: true + # environmental variables used in coverage env: OS: ${{ matrix.os }} diff --git a/MAINTENANCE.md b/MAINTENANCE.md index c6ed5d3477e..ecc9a2c600f 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -58,6 +58,8 @@ It is also scheduled to run daily on the *master* branch. This is ran on every commit to the *master* and Pull Request branches. It is also scheduled to run daily on the *master* branch. +In draft Pull Requests, only one job (Ubuntu + Python latest) +is triggered to save on Continuous Integration resources. On the *master* branch, the workflow also handles the documentation deployment: