-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add broader cargo checks - udeps, audit, fmt, clippy
- Loading branch information
1 parent
49ec2cb
commit ab4cf4e
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: 'Cargo check' | ||
description: 'Checks cargo with check, deny, format, clippy, udeps and audit.' | ||
|
||
inputs: | ||
github_token: | ||
description: 'GitHub token for cargo audit.' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: Install rustc nightly | ||
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }} | ||
run: rustup toolchain install nightly | ||
|
||
- name: Cargo deny | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
|
||
- name: Cargo check | ||
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }} | ||
run: cargo check --verbose | ||
|
||
- name: Cargo format | ||
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }} | ||
run: cargo fmt --all -- --check --verbose | ||
|
||
- name: Cargo clippy | ||
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }} | ||
run: cargo clippy | ||
|
||
- name: Cargo udeps | ||
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }} | ||
run: | | ||
cargo install cargo-udeps | ||
cargo +nightly udeps --all-targets | ||
- name: Cargo audit | ||
uses: rustsec/[email protected] | ||
with: | ||
token: ${{ inputs.github_token }} |