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+ on : [push, pull_request]
2+
3+ name : Code Coverage
4+
5+ permissions : {}
6+
7+ jobs :
8+ Codecov :
9+ name : Code Coverage
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+ with :
15+ persist-credentials : false
16+ - name : Install lcov tools
17+ run : sudo apt-get install lcov -y
18+ - name : Install Rust toolchain
19+ uses : actions-rs/toolchain@v1
20+ with :
21+ toolchain : nightly
22+ override : true
23+ profile : minimal
24+ components : llvm-tools-preview
25+ - name : Rust Cache
26+ uses : Swatinem/rust-cache@v2.7.8
27+ - name : Install cargo-llvm-cov
28+ run : if [[ ! -e ~/.cargo/bin/cargo-llvm-cov ]]; then cargo install cargo-llvm-cov; fi
29+ - name : Make coverage directory
30+ run : mkdir coverage
31+ - name : Test and report coverage
32+ run : cargo +nightly llvm-cov -q --doctests --branch --all-features --lcov --output-path ./coverage/lcov.info
33+ - name : Generate HTML coverage report
34+ run : genhtml -o coverage-report.html --ignore-errors unmapped ./coverage/lcov.info
35+ - name : Coveralls upload
36+ uses : coverallsapp/github-action@master
37+ with :
38+ github-token : ${{ secrets.GITHUB_TOKEN }}
39+ - name : Upload artifact
40+ uses : actions/upload-artifact@v4
41+ with :
42+ name : coverage-report
43+ path : coverage-report.html
You can’t perform that action at this time.
0 commit comments