Skip to content

Commit

Permalink
chore: update coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
eredotpkfr committed Dec 1, 2024
1 parent 769a231 commit 79afc65
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: ["main"]

env:
RUSTFLAGS: "-Dwarnings -Ccodegen-units=1"
RUSTFLAGS: "-Dwarnings"
CARGO_TERM_COLOR: "always"

jobs:
Expand All @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@ panic = "abort"
[profile.dist]
inherits = "release"

[profile.ci]
inherits = "release"

[package.metadata.cargo-machete]
ignored = ["prettytable-rs"]

0 comments on commit 79afc65

Please sign in to comment.