From 79afc65b40c3ae55187036720e73c0bc8ce45a75 Mon Sep 17 00:00:00 2001 From: Erdogan Yoksul Date: Sun, 1 Dec 2024 17:16:59 +0300 Subject: [PATCH] chore: update coverage workflow --- .github/workflows/coverage.yml | 21 +++++++++++++-------- Cargo.toml | 3 +++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3fbf46d2..d2abd354 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -6,7 +6,7 @@ on: branches: ["main"] env: - RUSTFLAGS: "-Dwarnings -Ccodegen-units=1" + RUSTFLAGS: "-Dwarnings" CARGO_TERM_COLOR: "always" jobs: @@ -21,14 +21,19 @@ jobs: - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 - - name: Generate code coverage - run: | - cargo llvm-cov clean --workspace - cargo llvm-cov --all-features --workspace --no-report nextest - cargo +nightly llvm-cov --all-features --workspace --no-report --doc - cargo +nightly llvm-cov report --doctests --lcov --output-path lcov.info + - name: Clean workspace + run: cargo llvm-cov clean --workspace - - name: Upload coverage to Codecov + - name: Run nextest + run: cargo llvm-cov --profile ci --all-features --workspace --no-report nextest + + - name: Run doc-test + run: cargo +nightly llvm-cov --profile ci --all-features --workspace --no-report --doc + + - name: Generate code coverage report + run: cargo +nightly llvm-cov report --doctests --lcov --output-path lcov.info + + - name: Upload coverage report to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index f8c02e25..ab24b03b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,5 +67,8 @@ panic = "abort" [profile.dist] inherits = "release" +[profile.ci] +inherits = "release" + [package.metadata.cargo-machete] ignored = ["prettytable-rs"]