-
Notifications
You must be signed in to change notification settings - Fork 201
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
CI: skip build/test jobs if only Docs/
is modified
#5387
Conversation
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.
Good idea!
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.
Excellent idea! I fully agree
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.
Nice!! 🤩
Note that this is handled by GitHub Actions in a way that is not optimal.
The GitHub Actions workflows that we skip will appear as "pending". This should be fine for now, as maintainers should be able to force-merge the PR anyways. Hopefully GitHub will fix this in the future, marking the workflows that are skipped as "skipped" rather than "pending". I can think of other work-arounds in the meantime. |
I think what I reported in the comment above, #5387 (comment), might be more pressing than we think. If you look at a docs PR, e.g., #5403, I personally do not have a way to merge it now, because GitHub (unlike Azure) is flagging the skipped workflows as "pending" and, since they are required, at least I cannot merge. I think other maintainers can probably merge, I definitely remember people merging PRs with failing or pending CI, but I cannot. |
@EZoni Instead of |
Could we do this to make sure that we run the GitHub Actions and Azure jobs (build, test) only if _at least one file outside the_ `Docs` _directory_ is modified, i.e., skip those jobs if only files in the `Docs` directory are modified? I think it would be safe to do so (and a bit of a waste of resources to not do so...), but I leave it open for discussion. If merged, we could test this rebasing ECP-WarpX#5386 and seeing if the correct CI jobs are skipped. Note that this PR leaves the other CI jobs untouched, e.g., `source`, `docs`, `CodeQL`, etc.
Following up on #5387, I think we should also ignore all `.rst` files in the repository when we decide whether or not to run the CI workflows. GitHub Actions syntax taken from the examples [here](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#patterns-to-match-file-paths) (see `'**.js'` example). Azure syntax to be tested. If we merge this before #5522, we can test it (i.e., test that CI is skipped) in #5522 after rebasing there.
Could we do this to make sure that we run the GitHub Actions and Azure jobs (build, test) only if at least one file outside the
Docs
directory is modified, i.e., skip those jobs if only files in theDocs
directory are modified?I think it would be safe to do so (and a bit of a waste of resources to not do so...), but I leave it open for discussion.
If merged, we could test this rebasing #5386 and seeing if the correct CI jobs are skipped.
Note that this PR leaves the other CI jobs untouched, e.g.,
source
,docs
,CodeQL
, etc.