File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ env :
12+ CARGO_TERM_COLOR : always
13+
14+ jobs :
15+ lint :
16+ name : Lint
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+ - name : Cache Rust dependencies
21+ uses : actions/cache@v3
22+ with :
23+ path : |
24+ ~/.cargo
25+ target
26+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
27+ restore-keys : |
28+ ${{ runner.os }}-cargo-
29+ - name : Set up Rust toolchain version
30+ run : echo "TOOLCHAIN_VERSION=$(cat rust-toolchain | tr -d '\n' | tr -d ' ')" >> $GITHUB_ENV
31+ - name : Install Rust toolchain
32+ run : |
33+ rustup set profile minimal
34+ rustup install "$TOOLCHAIN_VERSION"
35+ rustup default "$TOOLCHAIN_VERSION"
36+ rustup component add rustfmt clippy llvm-tools-preview rustc-dev
37+ rustup show
38+ - name : Test
39+ run : cargo test
40+ timeout-minutes : 20
41+ - name : Spell check
42+ uses : crate-ci/typos@master
43+ - name : Check formatting
44+ run : cargo fmt --check
45+ - name : Clippy
46+ run : |
47+ cargo clippy --all-targets -- -D warnings
48+ cargo +$TOOLCHAIN_VERSION clippy --all-targets --all-features -- -D warnings
You can’t perform that action at this time.
0 commit comments