-
Notifications
You must be signed in to change notification settings - Fork 41
77 lines (63 loc) · 1.98 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Test coverage
on:
push:
branches: [develop, production]
paths:
- ".github/workflows/coverage.yml"
- ".github/actions/**"
- "coverage.sh"
- "**.rs" # Include all rust files
- "**Cargo.toml" # Include all Cargo.toml files
- "**Cargo.lock" # Include all Cargo.lock files
- "!**/bindings/**" # Exclude all bindings
- "!cli/**" # Exclude CLI
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
collect-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
components: llvm-tools-preview
- name: Install required packages (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Install llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Start private tangle
uses: "./.github/actions/private-tangle/setup"
- name: Start ledger nano
uses: "./.github/actions/ledger-nano"
- name: Collect coverage data
run: >
cargo llvm-cov nextest
--lcov
--output-path coverage.info
--tests
--package iota-sdk
--all-features
--run-ignored all
--test-threads "num-cpus"
--retries 2
- name: Tear down private tangle
if: always()
uses: "./.github/actions/private-tangle/tear-down"
- name: Upload coverage data to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.info
flag-name: Unit