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 : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ env :
10+ CARGO_TERM_COLOR : always
11+
12+ jobs :
13+ ci :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Install Rust
19+ uses : dtolnay/rust-toolchain@stable
20+ with :
21+ components : rustfmt, clippy
22+
23+ - name : Cache cargo registry
24+ uses : actions/cache@v4
25+ with :
26+ path : ~/.cargo/registry
27+ key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
28+
29+ - name : Cache cargo index
30+ uses : actions/cache@v4
31+ with :
32+ path : ~/.cargo/git
33+ key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
34+
35+ - name : Cache cargo build
36+ uses : actions/cache@v4
37+ with :
38+ path : target
39+ key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
40+
41+ - name : Run tests
42+ run : cargo test --all
43+
44+ - name : Run clippy
45+ run : cargo clippy --all-targets --all-features -- -D warnings
46+
47+ - name : Check formatting
48+ run : cargo fmt --all -- --check
You can’t perform that action at this time.
0 commit comments