-
-
Notifications
You must be signed in to change notification settings - Fork 118
Description
Pre-submission checks
- I am not reporting a bug (crash, false positive/negative, etc). These must be filed via the bug report template.
- I have looked through both the open and closed issues for a duplicate request.
What's the problem this feature will solve?
Thanks for developing zizmor - I've found it to be a really useful tool and am making use of it in various projects.
I've been thinking about green software engineering practices and have recently been looking into green CI, i.e., reducing resource wastage in CI workflows. Some colleagues and I created https://github.com/Cambridge-ICCS/green-ci during a hackathon and it documents some of the things I mean.
Describe the solution you'd like
It'd be great to add some such rules to zizmor to encourage green CI usage. What I propose:
- 1. Always include a timeout on jobs to avoid wasted resources when jobs stall (should be fixed by Feature: Require or recommend the timeout-minutes property for all jobs #1023 #1067).
- 2. Always set up a
concurrencycheck that cancels running workflows when they get re-triggered (you don't need the original jobs to finish if you've already updated the branch). - 3. Use a separation of concerns approach to separate out workflows (tests, static analysis, docs) and only trigger each when associated files change.
If you agree that 2 sounds like a good idea then I'd be happy to take it on. I've been learning Rust this week and it'd be a great way to practice.
With 3 it wouldn't apply in all cases and doesn't seem like a good fit for a hard rule, but it might be nice to have a warning or info message to encourage this?
Additional context
No response