66 branches :
77 - main
88
9+ env :
10+ CARGO_TERM_COLOR : always
911
1012jobs :
1113 test :
@@ -20,24 +22,36 @@ jobs:
2022 runs-on : ${{ matrix.os }}
2123 steps :
2224 - uses : actions/checkout@v3
23- - uses : dtolnay/rust-toolchain@v1
25+ - uses : dtolnay/rust-toolchain@v1
2426 with :
2527 toolchain : nightly
28+ - uses : taiki-e/install-action@cargo-llvm-cov
29+ - uses : taiki-e/install-action@nextest
30+ - uses : Swatinem/rust-cache@v2
2631 - name : Test cases
2732 run : |
2833 git config --global user.name "Binbiubiubiu"
29- git config --global user.email "[email protected] " 30- cargo test --workspace --all --verbose
34+ git config --global user.email "[email protected] " 35+ cargo nextest run --workspace --all --verbose
36+ - name : Generate code coverage
37+ run : cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
38+ - name : Upload coverage to Codecov
39+ uses : codecov/codecov-action@v3
40+ with :
41+ token : ${{ secrets.CODECOV_TOKEN }} # not required for public repos
42+ files : lcov.info
43+ fail_ci_if_error : true
3144
3245 clippy :
3346 name : cargo clippy
3447 runs-on : ubuntu-latest
3548 steps :
3649 - uses : actions/checkout@v3
37- - uses : dtolnay/rust-toolchain@v1
50+ - uses : dtolnay/rust-toolchain@v1
3851 with :
3952 toolchain : nightly
40- components : clippy
53+ components : clippy
54+ - uses : Swatinem/rust-cache@v2
4155 - name : Check Clippy
4256 run : |
4357 cargo clippy --workspace --all-targets
5165 with :
5266 toolchain : stable
5367 components : rustfmt
68+ - uses : Swatinem/rust-cache@v2
5469 - name : Check formatting
5570 run : |
5671 cargo fmt --all -- --check
6378 - uses : dtolnay/rust-toolchain@v1
6479 with :
6580 toolchain : nightly
81+ - uses : Swatinem/rust-cache@v2
6682 - name : Check documenting
6783 run : |
6884 RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc --workspace --all-features --no-deps
0 commit comments