| 1 |
name: Coverage |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [master] |
| 6 |
|
| 7 |
permissions: |
| 8 |
contents: read |
| 9 |
|
| 10 |
concurrency: |
| 11 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 12 |
cancel-in-progress: true |
| 13 |
|
| 14 |
jobs: |
| 15 |
coverage: |
| 16 |
runs-on: ubuntu-latest |
| 17 |
steps: |
| 18 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 19 |
|
| 20 |
- name: Install Rust |
| 21 |
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 |
| 22 |
with: |
| 23 |
components: llvm-tools-preview |
| 24 |
|
| 25 |
- name: Install just & cargo-llvm-cov |
| 26 |
uses: taiki-e/install-action@065d6a08a14e61e89fb0a4c10eecdbdef39c7d8e # v2.85.4 |
| 27 |
with: |
| 28 |
tool: just,cargo-llvm-cov |
| 29 |
|
| 30 |
- name: Generate code coverage |
| 31 |
run: just test-coverage-codecov |
| 32 |
|
| 33 |
- name: Upload coverage to Codecov |
| 34 |
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 |
| 35 |
with: |
| 36 |
fail_ci_if_error: true |
| 37 |
files: codecov.json |
| 38 |
slug: bytesize-rs/bytesize |
| 39 |
token: ${{ secrets.CODECOV_TOKEN }} |