2022-03-10 16:17:49 +00:00
|
|
|
name: Coverage
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
|
2023-03-15 13:32:55 +00:00
|
|
|
permissions:
|
2023-08-03 06:03:42 +00:00
|
|
|
contents: read
|
2023-03-15 13:32:55 +00:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-03-10 16:17:49 +00:00
|
|
|
jobs:
|
|
|
|
coverage:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-12 04:44:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-12 04:24:55 +00:00
|
|
|
|
2023-08-03 05:58:31 +00:00
|
|
|
- name: Install Rust
|
2024-01-15 01:24:21 +00:00
|
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
2023-08-03 05:58:31 +00:00
|
|
|
with:
|
|
|
|
components: llvm-tools-preview
|
|
|
|
|
|
|
|
- name: Install cargo-llvm-cov
|
2024-03-02 18:24:18 +00:00
|
|
|
uses: taiki-e/install-action@v2.27.9
|
2023-08-03 05:58:31 +00:00
|
|
|
with:
|
|
|
|
tool: cargo-llvm-cov
|
2022-03-10 16:17:49 +00:00
|
|
|
|
2023-08-03 05:58:31 +00:00
|
|
|
- name: Generate code coverage
|
|
|
|
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
|
2022-03-10 16:17:49 +00:00
|
|
|
|
2023-08-03 05:58:31 +00:00
|
|
|
- name: Upload coverage to Codecov
|
2024-03-04 02:18:38 +00:00
|
|
|
uses: codecov/codecov-action@v4.1.0
|
2023-07-19 22:42:40 +00:00
|
|
|
with:
|
2023-08-03 05:58:31 +00:00
|
|
|
files: codecov.json
|
|
|
|
fail_ci_if_error: true
|
2024-02-01 07:34:23 +00:00
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|