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

[Feat] CI: add support for [skip ci] #2174

Closed
neteler opened this issue Feb 6, 2022 · 9 comments
Closed

[Feat] CI: add support for [skip ci] #2174

neteler opened this issue Feb 6, 2022 · 9 comments
Labels
CI Continuous integration enhancement New feature or request
Milestone

Comments

@neteler
Copy link
Member

neteler commented Feb 6, 2022

Is your feature request related to a problem? Please describe.

At time the full CI is run even when only doc/howto_release.md is edited which does not require CI checks at all.
This is a waste of runner resources.

Describe the solution you'd like

Like in the GDAL repo, add support for [skip ci] or [ci skip].

Note: Once implemented, the contributor needs to carefully decide if their PR submission may skip CI or not (it will rather be an exception to skip it).

@neteler neteler added enhancement New feature or request backport_needed CI Continuous integration labels Feb 6, 2022
@neteler neteler added this to the 8.2.0 milestone Feb 6, 2022
@wenzeslaus
Copy link
Member

Why not use paths-ignore like in the CodeQL workflow?

Instead of having a system when the contributor needs to carefully decide, paths-ignore or paths clearly decide on which PR or commit they should run.

@neteler
Copy link
Member Author

neteler commented Feb 6, 2022

Why not use paths-ignore like in the CodeQL workflow?

Ah, I wasn't aware of that possibility.

Instead of having a system when the contributor needs to carefully decide, paths-ignore or paths clearly decide on which PR or commit they should run.

Sounds good. I'll make a new attempt. Best would be to save these ignore-paths to a single file rather than replicating them in all workflows. Would that be possible?

@neteler
Copy link
Member Author

neteler commented Feb 6, 2022

See new PR #2176

@wenzeslaus wenzeslaus modified the milestones: 8.2.0, 8.4.0 Feb 28, 2022
@nilason
Copy link
Contributor

nilason commented Feb 14, 2023

I think we should start to use this as soon as possible. https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs

@wenzeslaus wenzeslaus modified the milestones: 8.3.0, 8.4.0 Feb 14, 2023
@wenzeslaus
Copy link
Member

I don't know how well the skip would work, the concurrency config for workflows seemed more hopeful, maybe combined with running specific checks for specific files.

@echoix
Copy link
Member

echoix commented Jan 3, 2024

Well, technically, skipping ci completely works natively since February 2021, I tested it in my fork just now, and none of the workflow was run, just like that blog post announcing it describes:

https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/

Knowing this, what exactly is the purpose of this issue? There are already some path filtering done in our workflows, like the docker one, and skipping CI works natively.

What is missing?

@neteler
Copy link
Member Author

neteler commented Jan 3, 2024

Nice, seems nobody ever tried it out so far.

@wenzeslaus
Copy link
Member

I think this is resolved and being resolved by faster workflows, so I'm closing this.

For skip itself, I would advice caution with [skip ci] outside of a PR branch because, well, it is [disable useful checks which help us prevent issues]. For main and possibly release branches in the future, see Skipping workflow runs in the doc:

You won't be able to merge the pull request if your repository is configured to require specific checks to pass first. To allow the pull request to be merged you can push a new commit to the pull request without the skip instruction in the commit message.

Importantly, the GitHub feature is mainly useful for skipping checks when pushing a lot of small or anyway unchecked changes to a PR branch, i.e., in a "sandbox" of a PR. (This is different from the idea in the OP where contributors needs to carefully decide about the nature of the changes even for merge to main.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants