-
Notifications
You must be signed in to change notification settings - Fork 11
74 lines (62 loc) · 2 KB
/
coverage.yaml
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
73
74
name: ci
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
strategy:
matrix:
version:
- nightly
target:
- x86_64-unknown-linux-gnu
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup DVC
uses: iterative/setup-dvc@v1
- name: Fetch Fixtures
uses: nick-fields/retry@v2
with:
max_attempts: 10
timeout_minutes: 30
command: dvc pull -v
- name: Install apt dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y clang libssl-dev llvm libudev-dev libgmp3-dev protobuf-compiler && \
sudo rm -rf /var/lib/apt/lists/*
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install Tarpaulin
run: cargo install cargo-tarpaulin
- name: Generate code coverage
run: |
SKIP_WASM_BUILD=1 cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10 \
-p pallet-token-wrapper-handler \
-p pallet-token-wrapper \
-p pallet-signature-bridge \
-p pallet-vanchor \
-p pallet-vanchor-handler \
-p pallet-mixer \
-p pallet-linkable-tree \
-p pallet-mt \
-p pallet-verifier \
-p pallet-hasher \
-p pallet-asset-registry \
--timeout 3600
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}