-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: app clippy, ignore two warnings because its the simplest soluti…
…on (#17) * feat: app clippy, ignore two warnings because its the simplest solution * fix: stop ignoring clippy
- Loading branch information
1 parent
0467260
commit c4d31e1
Showing
3 changed files
with
69 additions
and
7 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,62 @@ | ||
name: Rust CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: | ||
- version: stable | ||
profile: minimal | ||
- version: beta | ||
profile: default | ||
- version: nightly | ||
profile: default | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust | ||
run: | | ||
rustup toolchain install ${{ matrix.rust.version }} --profile ${{ matrix.rust.profile }} | ||
rustup default ${{ matrix.rust.version }} | ||
- name: Install protoc | ||
run: sudo apt-get install protobuf-compiler | ||
|
||
- name: Cache cargo build | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ runner.os }}-cargo-${{ matrix.rust.version }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install dependencies | ||
run: cargo fetch | ||
|
||
- name: Add clippy component if not stable | ||
if: matrix.rust.version != 'stable' | ||
run: rustup component add clippy | ||
|
||
- name: Run clippy | ||
run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
- name: Build project | ||
run: cargo build --verbose | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
- name: Install cargo-audit | ||
run: cargo install cargo-audit | ||
|
||
- name: Run cargo audit | ||
run: cargo audit |
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
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