-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
CI: fix when GitHub Actions builds trigger, and allow ci skips #18333
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
Conversation
Similar to what SciPy does. Right now, it triggers even on pushes to branches on forks, which is useless and generates lots of notifications on failures and wasted resources if no failures.
@@ -12,6 +20,7 @@ env: | |||
|
|||
jobs: | |||
smoke_test: | |||
if: "github.repository == 'numpy/numpy' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" | |||
runs-on: ubuntu-latest |
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.
I think this line can be broken, see https://stackoverflow.com/a/3790497.
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.
I did this on purpose actually. It may be necessary to copy this to each job (it is in SciPy, it may not be needed here because the other jobs depend on smoke_test
), and then longer vertical blocks for what's basically boilerplate becomes annoying.
I'd prefer to leave it as is for now.
Is this the same text used to skip CI on travis and/or Azure and/or shippable? It would be nice to have a github-specific skip phrase as well, so we could select which CI service to skip. We should also document the skip phrases somewhere. Where would be a better place than googling it each time? |
Yes, this PR contains a check for |
Good idea. How about https://numpy.org/devdocs/dev/development_workflow.html? |
Documenting it either in Asking for your changes to be merged or Additional things ... sounds good, with a small preference for the former. Would you like to add that here or in a separate PR? |
Agree, I can put it there. Prefer a follow-up PR. This is actively annoying me with failed builds whenever I push any commit to my own fork, so I'd like to get it in as is. |
Thanks @rgommers |
Appveyor is the only platform that may need copies and a yml alias would be easier to maintain than multiple long strings. |
@charris what's a yml alias? What I meant is, you can only put this under a job, so may need to repeat it multiple times in a file (example: https://github.com/scipy/scipy/blob/master/.github/workflows/linux.yml#L16) and per yml file. |
Thanks, learned something. Likely won't work though, from the atlassian link:
So looks like you cannot encode |
@rgommers I think that refers to the variable names, not the values. Strings are strings. |
Passed a yaml validator. |
Looked into it, it's valid yaml but not supported by GitHub Actions: https://github.community/t/support-for-yaml-anchors/16128/20. Looks like that's still the status today, which explains why I've never seen that syntax before. I'll send a PR for the docs. |
This is a follow-up to numpygh-18333. Self-test: docs get built on CircleCI, so let's skip the other platforms: [skip github] [skip azurepipelines] [skip appveyor] [skip travis]
This is a follow-up to numpygh-18333. Self-test: docs get built on CircleCI, so let's skip the other platforms: [skip github] [skip azurepipelines] [skip appveyor] [skip travis]
Similar to what SciPy does. Right now, it triggers even on pushes to branches on forks, which is useless and generates lots of notifications on failures and wasted resources if no failures.