-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (44 loc) · 1.21 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
name: Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
rust: [ nightly ]
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Install wasm32-unknown-unknown
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: wasm32-unknown-unknown
override: true
- uses: actions-rs/[email protected]
with:
crate: cargo-tarpaulin
version: 0.20.0
use-tool-cache: true
- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --no-fail-fast --all-features --line -p pallet-token-swap --timeout 300 --out Xml
- name: Upload To Codecov
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
verbose: true