-
Notifications
You must be signed in to change notification settings - Fork 225
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
Skip workflows in PRs if only non-source-code files are changed #839
Conversation
If I understand the documentation correctly, it should work. However, I can't test it. |
paths-ignore: | ||
- 'doc/**' | ||
- '*.md' | ||
- '*.json' | ||
- 'README.rst' | ||
- 'LICENSE.txt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if a git commit updates any file that matches these patterns (doc/**
, *.md
, etc), that means the workflow won't run? I guess that's ok, as long as we don't commit changes to a *.py and *.md file at the same time, or make sure to trigger the test somehow by editing only a *.py file.
A problem is that someone with administrative privileges might be required to merge the commit if the 'required checks' are not triggered. But I guess that's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if a git commit updates any file that matches these patterns (
doc/**
,*.md
, etc), that means the workflow won't run?
No. This is what the documentation says:
When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths.
If we make changes to a *.py and a .md file, the workflow still runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we make changes to a *.py and a .md file, the workflow still runs.
Ah ok, perfect!
So that it runs on every Pull Request commit, needed after change made in #839.
So that it runs on every Pull Request commit, needed after change made in #839. * Quickfix some code style links in CONTRIBUTING.md
…ingTools#839) Skip workflows in PRs if **ONLY** the following are changed: ``` - 'doc/**' - '*.md' - '*.json' - 'README.rst' - 'LICENSE.txt' ``` Any other changes (especially changes in `pygmt/` and `examples/`) still trigger the workflows. **Notes:** - `examples/` directory is not excluded because some examples may pass on one OS but fail on another one. - the workflow is always triggered in the master branch even though only plaintext files are changed Fixes GenericMappingTools#837. Reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths
…#849) So that it runs on every Pull Request commit, needed after change made in GenericMappingTools#839. * Quickfix some code style links in CONTRIBUTING.md
Description of proposed changes
Skip workflows in PRs if ONLY the following are changed:
Any other changes (especially changes in
pygmt/
andexamples/
) still trigger the workflows.Notes:
examples/
directory is not excluded because some examples may pass on one OS but fail on another one.Fixes #837.
Reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version