2022-01-19 14:42:12 -08:00
|
|
|
name: Coverage
|
2021-01-19 16:44:40 -08:00
|
|
|
|
|
|
|
on:
|
2022-01-19 14:42:12 -08:00
|
|
|
workflow_dispatch:
|
2021-01-19 16:44:40 -08:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
coverage:
|
2022-01-19 14:42:12 -08:00
|
|
|
name: Coverage (+nightly)
|
2021-01-19 16:44:40 -08:00
|
|
|
timeout-minutes: 30
|
2022-01-19 14:42:12 -08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2021-01-19 16:44:40 -08:00
|
|
|
steps:
|
2024-05-20 14:21:46 -07:00
|
|
|
- uses: actions/checkout@v4.1.6
|
2022-01-19 14:42:12 -08:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2021-01-19 16:44:40 -08:00
|
|
|
|
2021-05-12 02:01:07 -07:00
|
|
|
- uses: actions-rs/toolchain@v1.0.7
|
2021-01-19 16:44:40 -08:00
|
|
|
with:
|
2023-01-16 11:32:17 -08:00
|
|
|
toolchain: nightly
|
2021-01-19 16:44:40 -08:00
|
|
|
override: true
|
|
|
|
profile: minimal
|
|
|
|
components: llvm-tools-preview
|
|
|
|
|
2022-01-19 14:42:12 -08:00
|
|
|
- name: Install cargo-llvm-cov cargo command
|
|
|
|
run: cargo install cargo-llvm-cov
|
2021-01-19 16:44:40 -08:00
|
|
|
|
2022-01-19 14:42:12 -08:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo llvm-cov --lcov --no-report
|
2021-01-19 16:44:40 -08:00
|
|
|
|
2022-01-19 14:42:12 -08:00
|
|
|
- name: Generate coverage report
|
|
|
|
run: cargo llvm-cov --lcov --no-run --output-path lcov.info
|
2021-01-19 16:44:40 -08:00
|
|
|
|
|
|
|
- name: Upload coverage report to Codecov
|
2024-05-20 14:17:28 -07:00
|
|
|
uses: codecov/codecov-action@v4.4.0
|