ci: fix lint ci
Took 1 minute
This commit is contained in:
37
.github/workflows/tests-and-lints-template.yaml
vendored
37
.github/workflows/tests-and-lints-template.yaml
vendored
@@ -59,9 +59,12 @@ jobs:
|
||||
git config --global url."https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com".insteadOf ssh://github.com
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: dtolnay/rust-toolchain@888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1
|
||||
id: toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
toolchain: nightly
|
||||
components: rustfmt, clippy
|
||||
override: true
|
||||
|
||||
- name: Setup Rust Cache
|
||||
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
|
||||
@@ -100,28 +103,20 @@ jobs:
|
||||
echo "https://${{ steps.generate-token.outputs.token }}@github.com" > ~/.git-credentials
|
||||
git config --global url."https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com".insteadOf ssh://github.com
|
||||
|
||||
- name: Setup clippy toolchain - stable
|
||||
uses: dtolnay/rust-toolchain@888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1
|
||||
- name: Setup toolchain
|
||||
id: toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
|
||||
toolchain: nightly
|
||||
components: rustfmt, clippy
|
||||
override: true
|
||||
- name: Setup Rust Cache
|
||||
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
|
||||
- run: cargo +nightly clippy --workspace --lib --all-targets --all-features -- -D clippy::dbg-macro
|
||||
env:
|
||||
RUSTFLAGS: -Dwarnings
|
||||
- name: Clippy
|
||||
run: cargo clippy --workspace --all-targets --all-features
|
||||
|
||||
- run: cargo check --no-default-features
|
||||
env:
|
||||
RUSTFLAGS: -Dwarnings
|
||||
|
||||
- name: Setup rustfmt toolchain - nightly
|
||||
uses: dtolnay/rust-toolchain@a02741459ec5e501b9843ed30b535ca0a0376ae4
|
||||
with:
|
||||
components: rustfmt
|
||||
|
||||
- run: cargo +nightly fmt --all --check
|
||||
- name: Rustfmt
|
||||
run: cargo fmt --all --check
|
||||
|
||||
Reference in New Issue
Block a user