Repository navigation
ci: add example-plugin standard CI (ARM64 + Windows testing) #3
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,48 @@ | ||||||
| name: CI | ||||||
|
|
||||||
| on: | ||||||
| pull_request: | ||||||
| push: | ||||||
| branches: | ||||||
| - main | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| jobs: | ||||||
| rust: | ||||||
| name: Rust (${{ matrix.os }}) | ||||||
| runs-on: ${{ matrix.os }} | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: | ||||||
| os: | ||||||
| - ubuntu-latest | ||||||
| - ubuntu-24.04-arm | ||||||
| - macos-15 | ||||||
| - windows-latest | ||||||
| - windows-11-arm | ||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disable checkout credential persistence. The pinned checkout action defaults Based on learnings, disable credential persistence before executing third-party build code.
|
||||||
|
|
||||||
| - name: Install Rust | ||||||
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable action | ||||||
| with: | ||||||
| components: clippy, rustfmt | ||||||
|
|
||||||
| - name: Cache Rust | ||||||
| uses: Swatinem/rust-cache@2201cc584a476d1b508be977bbe4b7d1c7a52e9c # v2.9.3 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pin
Suggested fix
Committable suggestion
|
||||||
|
|
||||||
| - name: Check formatting | ||||||
| run: cargo fmt --all -- --check | ||||||
|
|
||||||
| - name: Clippy | ||||||
| run: cargo clippy --all-targets --locked -- -D warnings | ||||||
|
|
||||||
| - name: Test | ||||||
| run: cargo test --locked | ||||||
|
|
||||||
| - name: Build | ||||||
| run: cargo build --locked | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restrict the job token to read-only access.
This job inherits token permissions instead of declaring its required access. If repository defaults permit writes, the build receives unnecessary write permissions. Add
permissions: { contents: read }to this job. GitHub recommends explicitly granting only the required permissions. (docs.github.com)Based on learnings, restrict permissions for jobs that execute third-party build code.
zizmor (1.31.1)
[warning] 14-49: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
Sources: Learnings, Linters/SAST tools