ci: add github actions lint (zizmor), pin actions, use uv#6172
ci: add github actions lint (zizmor), pin actions, use uv#6172chirizxc wants to merge 21 commits into
zizmor), pin actions, use uv#6172Conversation
zizmor), pin actions, use uv
davidhewitt
left a comment
There was a problem hiding this comment.
Thanks, generally looks great! A few thoughts / questions.
| # A small hack to use anchors as GitHub doesn't allow it to be top level | ||
| \_○_○_/: &enable-cache-save >- | ||
| ${{ github.ref == 'refs/heads/main' || | ||
| contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }} |
There was a problem hiding this comment.
Clever trick! I'm a little worried github could break this in future, and that it might pollute env. Would it be simpler to just set it as an env var here? _PYO3_CI_ENABLE_CACHE_SAVE: ${{ github.ref ...
There was a problem hiding this comment.
For example: ${{ env._PYO3_CI_ENABLE_FAIL_FAST }} will not be available in strategy.fail-fast, since it is evaluated before the job is created, and the env context is not available at that point.
There was a problem hiding this comment.
GitHub have examples in the documentation; I don't think they'll change this behavior🧐
| secrets: inherit | ||
| secrets: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
There was a problem hiding this comment.
I guess this is just reducing the number of secrets passed down?
There was a problem hiding this comment.
https://docs.zizmor.sh/audits/#before_14
warning[secrets-inherit]: secrets unconditionally inherited by called workflow
--> .github/workflows\ci.yml:330:11
|
330 | uses: ./.github/workflows/build.yml
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this reusable workflow
...
340 | secrets: inherit
| ---------------- inherits all parent secrets
|
= note: audit confidence → High
108 findings (29 ignored, 78 suppressed): 0 informational, 0 low, 1 medium, 0 high| always() && | ||
| !contains(needs.*.result, 'failure') && |
There was a problem hiding this comment.
Why skip the check if a previous step failed (does GH successfully mark the check as failed?)
There was a problem hiding this comment.
I just reverted it back; it looks like jq works fine
Merging this PR will improve performance by 10.06%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | ordered_richcmp |
2.6 µs | 2.3 µs | +10.06% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing chirizxc:ci (9242378) with main (8fcf8fc)
This reverts commit 95b9db7.
/close #6171
Add zizmor to CI:
permissions: {}where not yetpersist-credentials: falseforactions/checkout