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
|
git config --global url."https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com".insteadOf ssh://github.com
|
||||||
|
|
||||||
- name: Setup toolchain
|
- name: Setup toolchain
|
||||||
uses: dtolnay/rust-toolchain@888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1
|
id: toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: nightly
|
||||||
|
components: rustfmt, clippy
|
||||||
|
override: true
|
||||||
|
|
||||||
- name: Setup Rust Cache
|
- name: Setup Rust Cache
|
||||||
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
|
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
|
||||||
@@ -100,28 +103,20 @@ jobs:
|
|||||||
echo "https://${{ steps.generate-token.outputs.token }}@github.com" > ~/.git-credentials
|
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
|
git config --global url."https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com".insteadOf ssh://github.com
|
||||||
|
|
||||||
- name: Setup clippy toolchain - stable
|
- name: Setup toolchain
|
||||||
uses: dtolnay/rust-toolchain@888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1
|
id: toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: nightly
|
||||||
components: clippy
|
components: rustfmt, clippy
|
||||||
|
override: true
|
||||||
- name: Setup Rust Cache
|
- name: Setup Rust Cache
|
||||||
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
|
||||||
- run: cargo +nightly clippy --workspace --lib --all-targets --all-features -- -D clippy::dbg-macro
|
- name: Clippy
|
||||||
env:
|
run: cargo clippy --workspace --all-targets --all-features
|
||||||
RUSTFLAGS: -Dwarnings
|
|
||||||
|
|
||||||
- run: cargo check --no-default-features
|
- name: Rustfmt
|
||||||
env:
|
run: cargo fmt --all --check
|
||||||
RUSTFLAGS: -Dwarnings
|
|
||||||
|
|
||||||
- name: Setup rustfmt toolchain - nightly
|
|
||||||
uses: dtolnay/rust-toolchain@a02741459ec5e501b9843ed30b535ca0a0376ae4
|
|
||||||
with:
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- run: cargo +nightly fmt --all --check
|
|
||||||
|
|||||||
Reference in New Issue
Block a user