Skip to content

Commit 1a12048

Browse files
authored
ci: informational cargo-llvm-cov coverage job (#25)
1 parent 22ebfbf commit 1a12048

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

‎.github/workflows/coverage.yml‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: coverage
2+
3+
# Informational only: never blocks merges (continue-on-error on the job).
4+
on:
5+
pull_request:
6+
push:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: coverage-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
llvm-cov:
19+
runs-on: ubuntu-22.04
20+
timeout-minutes: 30
21+
continue-on-error: true
22+
env:
23+
CARGO_TERM_COLOR: always
24+
steps:
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
26+
with:
27+
persist-credentials: false
28+
- name: Install stable Rust with llvm-tools
29+
run: |
30+
rustup toolchain install stable --profile minimal --component llvm-tools-preview
31+
rustup default stable
32+
- uses: taiki-e/install-action@f7e5d7c961414b23f5b25b2da9294395d08513ad # v2.87.26
33+
with:
34+
tool: cargo-llvm-cov@0.9.1
35+
- name: Run tests with coverage
36+
run: |
37+
set -euo pipefail
38+
cargo llvm-cov --locked --lcov --output-path lcov.info
39+
cargo llvm-cov report --summary-only | tee -a "$GITHUB_STEP_SUMMARY"
40+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
41+
with:
42+
name: lcov
43+
path: lcov.info
44+
retention-days: 14

0 commit comments

Comments
 (0)