File tree Expand file tree Collapse file tree 2 files changed +83
-0
lines changed
Expand file tree Collapse file tree 2 files changed +83
-0
lines changed 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+
19+ - name : Install Rust
20+ uses : dtolnay/rust-toolchain@stable
21+ with :
22+ components : rustfmt, clippy
23+
24+ - name : Cache dependencies
25+ uses : Swatinem/rust-cache@v2
26+
27+ - name : Check formatting
28+ run : cargo fmt -- --check
29+
30+ - name : Clippy
31+ run : cargo clippy -- -D warnings
32+
33+ - name : Run tests
34+ run : cargo test --verbose
35+
36+ build :
37+ name : Build
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v4
41+
42+ - name : Install Rust
43+ uses : dtolnay/rust-toolchain@stable
44+
45+ - name : Cache dependencies
46+ uses : Swatinem/rust-cache@v2
47+
48+ - name : Build
49+ run : cargo build --verbose
50+
51+ - name : Build (release)
52+ run : cargo build --verbose --release
Original file line number Diff line number Diff line change 1+ name : Code Coverage
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ coverage :
11+ name : Code Coverage
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Install Rust
17+ uses : dtolnay/rust-toolchain@stable
18+ with :
19+ components : llvm-tools-preview
20+
21+ - name : Install cargo-llvm-cov
22+ run : cargo install cargo-llvm-cov
23+
24+ - name : Generate code coverage
25+ run : cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
26+
27+ - name : Upload coverage to Codecov
28+ uses : codecov/codecov-action@v3
29+ with :
30+ file : ./lcov.info
31+ fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments