From 10d23c162617d152e7c0b4340604cb48e85e751f Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sun, 10 Nov 2024 14:40:19 +0000 Subject: [PATCH] =?UTF-8?q?ci(ssg):=20=F0=9F=92=9A=20fixing=20coverage.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/coverage.yml | 35 ++++++++-------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 49d66107..c280a13f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,40 +9,21 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Rust nightly + - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly - components: llvm-tools-preview + toolchain: stable override: true - - name: Run tests with code coverage - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --no-fail-fast - env: - CARGO_INCREMENTAL: '0' - RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort' - RUSTDOCFLAGS: '-Cpanic=abort' - - - name: Install grcov - run: | - sudo apt-get update - sudo apt-get install -y grcov + - name: Install Cargo Tarpaulin + run: cargo install cargo-tarpaulin - - name: Generate coverage report - run: | - # Check if -Zprofile flag is supported by the nightly toolchain - if cargo rustc -- -Zprofile > /dev/null 2>&1; then - grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing -o lcov.info - else - echo "-Zprofile flag is not supported in this nightly version." - exit 1 - fi + - name: Run tests with coverage + run: cargo tarpaulin --out Lcov --all-features --no-fail-fast env: CARGO_INCREMENTAL: '0' - RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort' + RUSTFLAGS: '-Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort' + RUSTDOCFLAGS: '-Cpanic=abort' - name: Upload coverage to Codecov uses: codecov/codecov-action@v4