File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run clippy
2+
3+ on :
4+ push :
5+ branches : ["*"]
6+
7+ # Allows you to run this workflow manually from the Actions tab
8+ workflow_dispatch :
9+
10+ env :
11+ CARGO_TERM_COLOR : always
12+
13+ jobs :
14+ clippy :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Set up cache
21+ uses : actions/cache@v3
22+ with :
23+ path : |
24+ ~/.cargo/.crates.toml
25+ ~/.cargo/.crates2.json
26+ ~/.cargo/bin/
27+ ~/.cargo/registry/index/
28+ ~/.cargo/registry/cache/
29+ ~/.cargo/git/db/
30+ ~/.rustup/toolchains/
31+ target/
32+ key : ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
33+
34+ # - name: Install WASM toolchain
35+ # run: rustup target add wasm32-unknown-unknown
36+
37+ - name : Check project
38+ run : cargo clippy --workspace --all-targets --all-features -- -D warnings
39+
40+ # - name: Check project (WASM)
41+ # # Note lack of --all-targets here because tests and examples are not wasm compatible
42+ # run: cargo clippy --workspace --all-features --target wasm32-unknown-unknown -- -D warnings
43+
44+ test :
45+ runs-on : ubuntu-latest
46+ steps :
47+ - name : Checkout
48+ uses : actions/checkout@v4
49+
50+ - name : Set up cache
51+ uses : actions/cache@v3
52+ with :
53+ path : |
54+ ~/.cargo/.crates.toml
55+ ~/.cargo/.crates2.json
56+ ~/.cargo/bin/
57+ ~/.cargo/registry/index/
58+ ~/.cargo/registry/cache/
59+ ~/.cargo/git/db/
60+ ~/.rustup/toolchains/
61+ target/
62+ key : ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
63+
64+ - name : Check project
65+ run : RUST_BACKTRACE=1 cargo test --workspace --all-targets --all-features
Original file line number Diff line number Diff line change 11[toolchain ]
22channel = " 1.88.0"
3+ components = [
4+ " rustc" ,
5+ " cargo" ,
6+ " rustfmt" ,
7+ " rust-std" ,
8+ " rust-docs" ,
9+ " rust-analyzer" ,
10+ " clippy" ,
11+ # "miri",
12+ " rust-src" ,
13+ # "rust-mingw",
14+ # "llvm-tools",
15+ # "rustc-dev",
16+ ]
You can’t perform that action at this time.
0 commit comments