ci: add deny advisories check #12
This file contains 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: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
branches: [main] | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Format Check | |
uses: actions-rust-lang/rustfmt@v1 | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
checks: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: clippy | |
- name: Clippy Check | |
uses: giraffate/clippy-action@v1 | |
with: | |
reporter: github-pr-check | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
clippy_flags: --workspace --all-targets --all-features | |
audit: | |
name: Audit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@v2.17.0 | |
with: | |
tool: cargo-deny | |
- name: Audit check | |
run: cargo deny check advisories |