Add zizmor as gh action - #3482
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
A5rocks
left a comment
There was a problem hiding this comment.
Thanks! Maybe it's a good idea to remove zizmor from pre-commit (if we have it there), to keep the versions identical. Also, maybe it would be nice to require the zizmor action? I.e. put it in the ci.yml file and as a requirement to the required workflow.
But not completely sure about either idea...
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3482 +/- ##
===============================================
Coverage 100.00000% 100.00000%
===============================================
Files 128 128
Lines 19449 19449
Branches 1320 1320
===============================================
Hits 19449 19449 🚀 New features to boost your workflow:
|
|
Pointing all our actions to zizmor passes on all zizmor operating modes🎉, we also have it in pre-commit, so it was straightforward to add the action. I don't know much about this tool but there probably are still room for improvements like I saw that attrs uses a pedantic persona https://github.com/python-attrs/attrs/blob/main/.github/workflows/zizmor.yml#L31 more on personas: https://docs.zizmor.sh/usage/#using-personas |
IMO i don't think its a bad idea to require it in ci.yml BUT i have never seen it in other projects so far, I think I didn't see it in zizmor itself too? not sure though plus I don't understand the need beyond what it would do if not required in ci.yml. |
To be clear I'm talking about how we have a single workflow (it uses |
Sorry, i may have slightly misunderstood what you was suggesting. I think the job you are referring to is this one, no? Lines 473 to 474 in 3769b07 and I can call zizmor from here as well. |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run zizmor 🌈 | ||
| uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1 |
There was a problem hiding this comment.
do we have a bot/workflow that will update these pinned versions? Pinning it to a specific hash otherwise seems like it'll quickly go stale. When we had it in pre-commit it was handled by the pre-commit bot.
There was a problem hiding this comment.
perhaps related, why does this specify # v0.6.1 when the pre-commit was using v1.28.0
There was a problem hiding this comment.
Yeah, I guess non-hashes would be better for now. We want to eventually switch to locked actions (whether that's through hashes or through GitHub's native thing (coming soon:tm:)...), at which point we can figure out updating :-)
There was a problem hiding this comment.
Granted: It was almost copy pasted from zizmor integration docs.
There was a problem hiding this comment.
perhaps related, why does this specify
# v0.6.1when the pre-commit was usingv1.28.0
# v0.6.1 is the action's version and the latter was for the zizmor version used by pre-commit?
|
the ci failures seems related to codecov. I will investigate. |
|
Given running things on I will admit though, this will introduce version matching issues, would likely want a tool similar to |
|
I suggested it cause the version matching, yeah. (and also since the action will be able to check more since it has a github token, so passing one doesn't mean passing the other) I'd be fine with whatever outcome is best. |
Closing #3168 and following up on #3154 (comment)