Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests in a single CI job (Ubuntu + Python 3.9) for draft PRs #906

Merged
merged 5 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches: [ master ]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
seisman marked this conversation as resolved.
Show resolved Hide resolved
paths-ignore:
- 'doc/**'
- '*.md'
Expand All @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +61 to +62
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In draft Pull Requests, only one job (Ubuntu + Python latest)
is triggered to save on Continuous Integration resources.
To save on Continuous Integration resources, keep your Pull Request
in draft mode so that only one job (Ubuntu + Python latest) is triggered.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Alternatively, add [skip ci] to your commit message so that Github Actions won't run.
See https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to leave it to another PR, as more tests need to be done before documenting it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, feel free to copy this text to that next PR.

On the *master* branch, the workflow also handles the documentation deployment:

Expand Down