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

Doc-only PRs skip required CI jobs to save time, but doesn't allow merge #436

Closed
tomvothecoder opened this issue Apr 8, 2021 · 0 comments · Fixed by #437
Closed

Doc-only PRs skip required CI jobs to save time, but doesn't allow merge #436

tomvothecoder opened this issue Apr 8, 2021 · 0 comments · Fixed by #437
Assignees
Labels
DevOps CI/CD, configuration, etc.

Comments

@tomvothecoder
Copy link
Collaborator

tomvothecoder commented Apr 8, 2021

In .github/workflows/build_workflow.yml, it specifies path-ignores: ["docs/**"] for PRs (https://github.com/E3SM-Project/e3sm_diags/blob/master/.github/workflows/build_workflow.yml#L10). This means that CI jobs are skipped for PRs with doc-only changes, which saves resources and time since doc-only changes do not affect the build.

However, the skipped jobs are required in order to merge the build. This is an ongoing requested GitHub feature to allow doc-only PRs be merged and bypass the required checks.

Related posts:

Possible solution: https://github.com/marketplace/actions/skip-duplicate-actions#skip-ignored-paths

In many projects, it is unnecessary to run all tests for documentation-only-changes. Therefore, GitHub provides a paths-ignore feature out of the box. However, GitHub's paths-ignore has some limitations:

  • GitHub's paths-ignore fails to look at previous commits. This means that the outcome depends on how often you push changes.
  • Consequently, GitHub's paths-ignore does not work for required checks. If you path-ignore a required check, then pull requests will block forever without being mergeable.

To overcome those limitations, skip-duplicate-actions provides a more flexible paths_ignore-feature with an efficient backtracking-algorithm. Instead of stupidly looking at the current commit, paths_ignore will look for successful checks in your commit-history.

@tomvothecoder tomvothecoder added the DevOps CI/CD, configuration, etc. label Apr 8, 2021
@tomvothecoder tomvothecoder self-assigned this Apr 8, 2021
@tomvothecoder tomvothecoder changed the title Fix doc-only PRs skipping required CI jobs, which doesn't allow merge Doc-only PRs skips required CI jobs, which doesn't allow merge Apr 8, 2021
@tomvothecoder tomvothecoder changed the title Doc-only PRs skips required CI jobs, which doesn't allow merge Doc-only PRs skip required CI jobs to save time, but doesn't allow merge Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps CI/CD, configuration, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant