-
Notifications
You must be signed in to change notification settings - Fork 23
54 lines (51 loc) · 1.5 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
name: Coverage
on:
push:
branches:
- 'main'
jobs:
check:
name: Check
if: github.repository == 'Kuadrant/limitador'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- uses: abelfodil/protoc-action@v1
with:
protoc-version: '3.19.4'
- uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
if: github.repository == 'Kuadrant/limitador'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supercharge/redis-github-action@1.1.0
with:
redis-version: 7
# Nightly is required for code coverage with doctests
# https://github.com/taiki-e/cargo-llvm-cov/issues/2
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- uses: abelfodil/protoc-action@v1
with:
protoc-version: '3.19.4'
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test and Generate code coverage
run: cargo +nightly llvm-cov --all-features --workspace --lcov --doctests --output-path lcov.info
- name: Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: env.CODECOV_TOKEN != null
uses: codecov/codecov-action@v3
with:
verbose: true
fail_ci_if_error: false