File tree Expand file tree Collapse file tree 2 files changed +82
-0
lines changed
Expand file tree Collapse file tree 2 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 1+ github : ShieldBattery
2+ ko_fi : tec27
3+ patreon : tec27
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+ test :
14+ name : Test
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ - name : Install Rust
19+ uses : dtolnay/rust-toolchain@stable
20+ - name : Cache cargo registry
21+ uses : actions/cache@v4
22+ with :
23+ path : |
24+ ~/.cargo/registry
25+ ~/.cargo/git
26+ target
27+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
28+ - name : Run tests
29+ run : cargo test --workspace
30+
31+ fmt :
32+ name : Format
33+ runs-on : ubuntu-latest
34+ steps :
35+ - uses : actions/checkout@v4
36+ - name : Install Rust
37+ uses : dtolnay/rust-toolchain@stable
38+ with :
39+ components : rustfmt
40+ - name : Check formatting
41+ run : cargo fmt --all -- --check
42+
43+ check :
44+ name : Check
45+ runs-on : ubuntu-latest
46+ steps :
47+ - uses : actions/checkout@v4
48+ - name : Install Rust
49+ uses : dtolnay/rust-toolchain@stable
50+ - name : Cache cargo registry
51+ uses : actions/cache@v4
52+ with :
53+ path : |
54+ ~/.cargo/registry
55+ ~/.cargo/git
56+ target
57+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
58+ - name : Check compilation
59+ run : cargo check --workspace --all-targets
60+
61+ clippy :
62+ name : Clippy
63+ runs-on : ubuntu-latest
64+ steps :
65+ - uses : actions/checkout@v4
66+ - name : Install Rust
67+ uses : dtolnay/rust-toolchain@stable
68+ with :
69+ components : clippy
70+ - name : Cache cargo registry
71+ uses : actions/cache@v4
72+ with :
73+ path : |
74+ ~/.cargo/registry
75+ ~/.cargo/git
76+ target
77+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
78+ - name : Run clippy
79+ run : cargo clippy --workspace --all-targets --all-features -- -D warnings
You can’t perform that action at this time.
0 commit comments