Conversation
This PR makes changes to save CI resources: - For draft PRs: only run tests on Ubuntu + Python 3.9 (~10 minutes) - When draft PRs are ready for review, run all CI jobs (9 jobs, 10-30 minutes) - If converting PRs back to draft mode, pushes still only trigger one job
|
Now, this PR is in draft mode. As expected, commit af67396 only triggers one job (Ubuntu + Python 3.9). Check https://github.com/GenericMappingTools/pygmt/actions/runs/570286139 for the job details. Below is the screenshot of the CI runs. Only the "ubuntu-latest - Python 3.9" job is triggered. Other jobs are waiting for status because they're not triggered. |
|
This PR is still in draft mode. New commits like 7c6309d still only triggers one job (ubuntu-latest - Python 3.9). Check https://github.com/GenericMappingTools/pygmt/actions/runs/570313438 for job details. Here is the screenshot of the CI runs. Only one is running (in progress). |
|
I just pushed the "Ready for Review" button, which triggers all the CI jobs. Check https://github.com/GenericMappingTools/pygmt/actions/runs/570319849 for job details. Below is the screenshot for job status. Some notes:
|
|
The PR is not in draft mode, so new commits like 4dc7e87 trigger new CI runs (9 jobs). Check https://github.com/GenericMappingTools/pygmt/actions/runs/570349410 for job details. Some notes:
|
|
PR authors and project maintainers can convert a PR into draft mode. Note that "convert to draft" is not an "event", so it doesn't trigger new CI runs. |
|
Now the PR is in draft mode. New commits like 06d0073 only triggers one job (ubuntu-latest + Python 3.9). Check https://github.com/GenericMappingTools/pygmt/actions/runs/570386483 for job details. |
|
Now I can make more changes in draft mode. Each commit only triggers one job, so saving us 8/9 CI resources, especially for macOS and Windows. Like above, if I mark the PR as ready for review again, 9 jobs will be triggered. So what will happen if the changes are merged into master branch? I can't show you in this repository. Instead, I made similar changes to my own fork (https://github.com/seisman/pygmt), and merge the changes into my master branch. Everything works well. See the screenshot below and https://github.com/seisman/pygmt/actions/runs/570241183 for job details. The "Publish to PyPI" workflow fails as reported in #901. |
|
Now this PR is ready for review. |
weiji14
left a comment
There was a problem hiding this comment.
This is awesome, now I won't feel so bad burning through so many CPU cycles! Just a few comments.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
| In draft Pull Requests, only one job (Ubuntu + Python latest) | ||
| is triggered to save on Continuous Integration resources. |
There was a problem hiding this comment.
| 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. |
| 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. | ||
|
|
There was a problem hiding this comment.
| 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/. | |
There was a problem hiding this comment.
Prefer to leave it to another PR, as more tests need to be done before documenting it.
There was a problem hiding this comment.
Ok, feel free to copy this text to that next PR.
…enericMappingTools#906) This PR improves the "Tests" workflow to save CI resources: - For draft PRs: only run tests on Ubuntu + Python 3.9 (~10 minutes) - When draft PRs are ready for review, run all CI jobs (9 jobs, 10-30 minutes) - If converting PRs back to draft mode, pushes still only trigger one job (~10 minutes) - After merged into master, all 9 jobs will run. * Update MAINTENANCE.md Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>






Description of proposed changes
This PR is inspired by another PR #869 from @willschlitzer.
This PR improves the "Tests" workflow to save CI resources.
Expected behavior (see the comments below for how it actually works):
References:
Closes #869.