File tree Expand file tree Collapse file tree 2 files changed +22
-7
lines changed
Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 3737 with :
3838 toolchain : ${{ matrix.toolchain }}
3939 components : clippy, rustfmt
40- - name : Cache cargo registry
41- uses : actions/cache@v4
42- with :
43- path : ~/.cargo/registry/cache
44- key : ${{ runner.os }}-${{ matrix.conf }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
45- restore-keys : |
46- ${{ runner.os }}-${{ matrix.conf }}-cargo-registry-
40+ - uses : Swatinem/rust-cache@v2
4741 - name : Run rustfmt
4842 if : matrix.toolchain == 'stable'
4943 run : |
5751 run : cargo test
5852 - name : Build docs
5953 run : cargo doc --no-deps
54+ code-coverage :
55+ needs : [build-test-unix]
56+ runs-on : ubuntu-latest
57+ steps :
58+ - uses : actions/checkout@v4
59+ - name : Install stable
60+ uses : dtolnay/rust-toolchain@stable
61+ - uses : Swatinem/rust-cache@v2
62+ - name : Install cargo-llvm-cov
63+ uses : taiki-e/install-action@v2
64+ with :
65+ tool : cargo-llvm-cov
66+ - name : Generate code coverage
67+ run : cargo llvm-cov --codecov --output-path codecov.json --ignore-filename-regex tests\.rs
68+ - name : Upload coverage to Codecov
69+ uses : codecov/codecov-action@v5
70+ with :
71+ token : ${{ secrets.CODECOV_TOKEN }}
72+ files : codecov.json
73+ fail_ci_if_error : false
Original file line number Diff line number Diff line change 11/target
22Cargo.lock
33/.idea
4+ codecov.json
You can’t perform that action at this time.
0 commit comments