forked from chainflip-io/chainflip-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 2.29 KB
/
_11_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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
on:
workflow_call:
inputs:
test_features:
description: Features to enable in tests
type: string
default: "runtime-benchmarks,slow-tests"
env:
FORCE_COLOR: 1
jobs:
unit-tests:
runs-on: namespace-profile-rust-builder
container:
image: "ghcr.io/${{ github.repository }}/rust-base:nightly-2024-02-04-ubuntu-22.04-48"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
env:
NSC_CACHE_PATH: "/cache"
volumes:
- /cache:/cache # Where the Cache Volume is mounted.
options: --cap-add=SYS_ADMIN # Required to by nscloud-cache-action to call `mount`.
steps:
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Rust cache 🦀💰
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: cargo cf-test-ci --locked
run: |
cargo cf-test-ci --locked
coverage:
runs-on: namespace-profile-rust-builder
container:
image: "ghcr.io/${{ github.repository }}/rust-base:nightly-2024-02-04-ubuntu-22.04-48"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
env:
NSC_CACHE_PATH: "/cache"
volumes:
- /cache:/cache # Where the Cache Volume is mounted.
options: --cap-add=SYS_ADMIN # Required to by nscloud-cache-action to call `mount`.
steps:
- name: Checkout 🛒
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Rust cache 🦀💰
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
- name: Install cargo-llvm-cov 💿
uses: taiki-e/install-action@c2648687d6fe1a5a70a4b65c84715cafab1f3451
with:
tool: cargo-llvm-cov
- name: Generate code coverage ✨
run: cargo llvm-cov --lib --features ${{ inputs.test_features}} --workspace --codecov --output-path lcov.info
- name: Upload coverage to Codecov 📊
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
with:
token: ${{ secrets.CF_BACKEND_CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: false