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

CI: skip build/test jobs if only Docs/ is modified #5387

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

EZoni
Copy link
Member

@EZoni EZoni commented Oct 10, 2024

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 #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.

Copy link
Member

@WeiqunZhang WeiqunZhang left a comment

Choose a reason for hiding this comment

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

Good idea!

Copy link
Member

@lucafedeli88 lucafedeli88 left a 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

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

Nice!! 🤩

@ax3l ax3l merged commit baf32f3 into ECP-WarpX:development Oct 11, 2024
37 checks passed
@ax3l ax3l self-assigned this Oct 11, 2024
@EZoni EZoni deleted the ci_ignore_docs branch October 12, 2024 00:55
@EZoni
Copy link
Member Author

EZoni commented Oct 14, 2024

Note that this is handled by GitHub Actions in a way that is not optimal.

From their docs (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks):

Warning: If a workflow is skipped due to path filtering, branch filtering or a commit message, then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tests Tests and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants