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 : Code coverage
2+ description : Generate code coverage and upload to codecov
3+ inputs :
4+ token :
5+ description : Codecov token
6+ required : true
7+
8+ runs :
9+ using : composite
10+ steps :
11+ - name : Install cargo-llvm-cov
12+ shell : bash
13+ run : cargo install cargo-llvm-cov
14+
15+ - name : Generate code coverage
16+ shell : bash
17+ run : cargo llvm-cov --codecov --output-path codecov.json
18+
19+ - name : Upload to codecov.io
20+ uses : codecov/codecov-action@v5
21+ with :
22+ token : ${{ inputs.token }}
23+ fail_ci_if_error : true
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Cargo Test
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+
8+ env :
9+ CARGO_TERM_COLOR : always
10+
11+ jobs :
12+ build_and_test :
13+ name : Run tests
14+ runs-on : ${{ matrix.os }}
15+ timeout-minutes : 15
16+ strategy :
17+ fail-fast : false
18+ matrix :
19+ os : [ubuntu-latest, windows-latest, macos-latest]
20+ include :
21+ - os : ubuntu-latest
22+ coverage : true
23+ steps :
24+ - uses : actions/checkout@v4
25+ - uses : actions-rust-lang/setup-rust-toolchain@v1
26+ with :
27+ toolchain : stable
28+ - run : cargo test --verbose
29+
30+ - if : ${{ matrix.coverage }}
31+ uses : ./.github/actions/codecov
32+ with :
33+ token : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments