mirror of
https://github.com/orhun/git-cliff.git
synced 2024-12-13 10:45:07 +03:00
chore(ci): switch to cargo-tarpaulin for measuring code coverage (#110)
This commit is contained in:
parent
5cb991d4e3
commit
17f3a0994d
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@ -50,16 +50,22 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
- name: Run tests
|
||||
- name: Setup cargo-tarpaulin
|
||||
run: |
|
||||
export CARGO_INCREMENTAL=0
|
||||
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
|
||||
export RUSTDOCFLAGS="-Cpanic=abort"
|
||||
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
|
||||
cargo test --verbose $CARGO_OPTIONS
|
||||
zip -0 ccov.zip `find . \( -name "git_cliff*.gc*" \) -print`;
|
||||
./grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" -o lcov.info;
|
||||
bash <(curl -s https://codecov.io/bash) -f lcov.info;
|
||||
curl -s https://api.github.com/repos/xd009642/tarpaulin/releases/latest | \
|
||||
grep "browser_download_url.*tar.gz" | cut -d : -f 2,3 | tr -d \" | wget -qi -
|
||||
tar -xzf cargo-tarpaulin-*.tar.gz
|
||||
mv cargo-tarpaulin ~/.cargo/bin/
|
||||
- name: Run tests
|
||||
run: cargo tarpaulin --out Xml --verbose
|
||||
- name: Upload reports to codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
name: code-coverage-report
|
||||
file: cobertura.xml
|
||||
flags: unit-tests
|
||||
fail_ci_if_error: true
|
||||
verbose: true
|
||||
|
||||
clippy:
|
||||
name: Lints
|
||||
|
Loading…
Reference in New Issue
Block a user