Lint repo #1
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
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
name: Rust CI | |
jobs: | |
rust_lint: | |
name: Lint Rust | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust | |
uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: false | |
shared-key: base | |
- name: "`cargo fmt` check on ironfish-rust" | |
run: | | |
cargo fmt --all -- --check | |
- name: "Clippy check on ironfish-rust" | |
run: | | |
cargo clippy --all-targets --all-features -- -D warnings | |
cargo_check: | |
name: Check Rust | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust | |
uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: false | |
shared-key: base | |
- name: Install cargo-all-features | |
run: | | |
cargo install --locked cargo-all-features | |
- name: Check that cargo lockfile is up to date | |
run: | | |
cargo check-all-features --locked --all-targets | |
cargo_vet: | |
name: Vet Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust | |
uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: false | |
shared-key: base | |
- name: Install cargo-vet | |
run: | | |
cargo install --locked cargo-vet | |
- name: Vet dependencies | |
run: | | |
cargo vet |