2022-02-03 23:57:02 +01:00
|
|
|
name: Coverage
|
|
|
|
|
|
|
|
on:
|
2023-09-16 01:30:38 +02:00
|
|
|
push:
|
|
|
|
branches: [master]
|
2023-04-09 20:35:30 +02:00
|
|
|
|
2023-04-09 20:41:57 +02:00
|
|
|
permissions: { contents: read }
|
2023-04-09 20:35:30 +02:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-02-03 23:57:02 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
coverage:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
services:
|
|
|
|
redis:
|
|
|
|
image: redis:5.0.7
|
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
options: --entrypoint redis-server
|
|
|
|
|
|
|
|
steps:
|
2023-09-16 01:54:02 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-02-03 23:57:02 +01:00
|
|
|
|
2024-02-05 17:25:37 +01:00
|
|
|
- name: Install Rust
|
2024-01-15 17:02:19 +01:00
|
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
2023-09-16 01:30:38 +02:00
|
|
|
with:
|
2024-02-05 17:25:37 +01:00
|
|
|
components: llvm-tools-preview
|
2022-02-03 23:57:02 +01:00
|
|
|
|
2024-02-05 17:25:37 +01:00
|
|
|
- name: Install cargo-llvm-cov
|
2024-04-09 12:13:40 +02:00
|
|
|
uses: taiki-e/install-action@v2.32.9
|
2024-02-05 17:25:37 +01:00
|
|
|
with:
|
|
|
|
tool: cargo-llvm-cov
|
|
|
|
|
|
|
|
- name: Generate code coverage
|
|
|
|
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
|
2023-04-09 20:41:57 +02:00
|
|
|
|
2022-02-03 23:57:02 +01:00
|
|
|
- name: Upload to Codecov
|
2024-04-09 12:13:54 +02:00
|
|
|
uses: codecov/codecov-action@v4.2.0
|
2023-09-16 01:30:38 +02:00
|
|
|
with:
|
2024-02-05 17:25:37 +01:00
|
|
|
files: codecov.json
|
|
|
|
fail_ci_if_error: true
|
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|