From 2d3cfaae79bb78cd780eb596404fd148e64b443d Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Thu, 10 Aug 2023 15:47:37 -0500 Subject: [PATCH 1/2] Add code coverage to bindgen --- .github/workflows/bindgen.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/bindgen.yml b/.github/workflows/bindgen.yml index 72a34fa06c..7f9174abe8 100644 --- a/.github/workflows/bindgen.yml +++ b/.github/workflows/bindgen.yml @@ -250,3 +250,25 @@ jobs: curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar xz ./mdbook build book ./mdbook test book + + coverage: + runs-on: ubuntu-latest + env: + CARGO_TERM_COLOR: always + steps: + - uses: actions/checkout@v3 + + - name: Install Rust + run: rustup update stable + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Generate code coverage + run: cargo llvm-cov --features="experimental" --workspace --lcov --output-path lcov.info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: lcov.info + fail_ci_if_error: true From f38028e8098648c4aeba8362a9548b5505897d61 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Thu, 10 Aug 2023 15:58:59 -0500 Subject: [PATCH 2/2] Remove unnecessary flags --- .github/workflows/bindgen.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bindgen.yml b/.github/workflows/bindgen.yml index 7f9174abe8..7d0f2201f4 100644 --- a/.github/workflows/bindgen.yml +++ b/.github/workflows/bindgen.yml @@ -265,7 +265,7 @@ jobs: uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --features="experimental" --workspace --lcov --output-path lcov.info + run: cargo llvm-cov --lcov --output-path lcov.info - name: Upload coverage to Codecov uses: codecov/codecov-action@v3