chore(workflow): replace action clippy-action with a managed action #72
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
merge_group: | |
pull_request: | |
push: | |
branches: main | |
permissions: | |
contents: read | |
checks: write | |
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. | |
# Ensures that we don't waste CI time, and returns results quicker. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
CARGO_PROFILE_DEV_DEBUG: 1 | |
CARGO_PROFILE_RELEASE_DEBUG: 1 | |
RUST_BACKTRACE: short | |
CARGO_NET_RETRY: 10 | |
RUSTUP_MAX_RETRIES: 10 | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
fmt: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Check formatting | |
uses: actions-rust-lang/rustfmt@v1 | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: clippy | |
- name: Run clippy | |
uses: step-security/clippy-action@v1.4.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# doc: | |
# name: Doc | |
# runs-on: ubuntu-latest | |
# env: | |
# RUSTDOCFLAGS: -Dwarnings | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Setup Rust toolchain | |
# uses: actions-rust-lang/setup-rust-toolchain@v1 | |
# with: | |
# # Run docs generation on nightly rather than stable. This enables features like | |
# # https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an | |
# # API be documented as only available in some specific platforms. | |
# toolchain: nightly | |
# - name: Install cargo-docs-rs | |
# uses: dtolnay/install@cargo-docs-rs | |
# - name: Generate documentation | |
# run: cargo docs-rs |