Skip to content

Commit

Permalink
ci: coverage via just
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Jun 20, 2024
1 parent 032aeb6 commit 2a092a1
Show file tree
Hide file tree
Showing 5 changed files with 46,616 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
toolchain: nightly

- name: Install cargo-hack and cargo-ci-cache-clean
- name: Install cargo-hack, cargo-ci-cache-clean
uses: taiki-e/[email protected]
with:
tool: cargo-hack,cargo-ci-cache-clean
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
with:
toolchain: ${{ matrix.version.version }}

- name: Install cargo-hack and cargo-ci-cache-clean
- name: Install cargo-hack, cargo-ci-cache-clean
uses: taiki-e/[email protected]
with:
tool: cargo-hack,cargo-ci-cache-clean
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
tool: cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
run: just test-coverage-codecov

- name: Upload to Codecov
uses: codecov/[email protected]
Expand Down
16 changes: 15 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,21 @@ test:

# Test workspace code and docs.
[group("test")]
test-all: (test) (test-docs)
test-all: test test-docs

# Test workspace and collect coverage info.
[private]
test-coverage:
cargo {{ toolchain }} llvm-cov nextest --no-report --all-features
cargo {{ toolchain }} llvm-cov --doc --no-report --all-features

# Test workspace and generate Codecov report.
test-coverage-codecov: test-coverage
cargo {{ toolchain }} llvm-cov report --doctests --codecov --output-path=codecov.json

# Test workspace and generate LCOV report.
test-coverage-lcov: test-coverage
cargo {{ toolchain }} llvm-cov report --doctests --lcov --output-path=lcov.info

# Test workspace docs.
[group("test")]
Expand Down
Loading

0 comments on commit 2a092a1

Please sign in to comment.