From bd94b5717c906bcf70166b468658071f61ccac72 Mon Sep 17 00:00:00 2001 From: spacebear Date: Mon, 11 Nov 2024 18:15:40 -0500 Subject: [PATCH] Merge coverages generated under v1 and v2 --- .github/workflows/rust.yml | 2 +- contrib/coverage.sh | 8 ++++++++ contrib/lint.sh | 0 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 contrib/coverage.sh mode change 100644 => 100755 contrib/lint.sh diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 63c87a0b..d0c3745a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -66,6 +66,6 @@ jobs: - name: "Install cargo-llvm-cov" uses: taiki-e/install-action@cargo-llvm-cov - name: "Generate code coverage for tests" - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + run: bash contrib/coverage.sh - name: "Upload report to coveralls" uses: coverallsapp/github-action@v2 diff --git a/contrib/coverage.sh b/contrib/coverage.sh new file mode 100755 index 00000000..2d453b67 --- /dev/null +++ b/contrib/coverage.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -e + +# https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#merge-coverages-generated-under-different-test-conditions +cargo llvm-cov clean --workspace # remove artifacts that may affect the coverage results +cargo llvm-cov --no-report --features=send,receive +cargo llvm-cov --no-report --features=v2,danger-local-https,io +cargo llvm-cov report --lcov --output-path lcov.info # generate report without tests diff --git a/contrib/lint.sh b/contrib/lint.sh old mode 100644 new mode 100755