-
Notifications
You must be signed in to change notification settings - Fork 46
63 lines (54 loc) · 1.8 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
name: Task - Integration Tests
on:
workflow_dispatch:
workflow_call:
secrets:
ETH_FORK_URL:
required: true
jobs:
coverage:
permissions:
pull-requests: write
runs-on: karnot-arc-runner-set
steps:
- uses: actions/checkout@v4
- name: Setup build deps
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler gcc g++ build-essential libssl-dev pkg-config curl wget git
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.81
- uses: Swatinem/rust-cache@v2 # use a different cache key as coverae uses custom rustc args
with:
cache-provider: buildjet
key: "coverage"
- uses: rui314/setup-mold@v1
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build and run tests
env:
ETH_FORK_URL: ${{ secrets.ETH_FORK_URL }}
GATEWAY_KEY: ${{ secrets.GITHUB_GATEWAY_KEY || '' }}
PROPTEST_CASES: 10
run: |
source <(cargo llvm-cov show-env --export-prefix)
cargo build --bin madara --profile dev
export COVERAGE_BIN=$(realpath target/debug/madara)
rm -f target/madara-* lcov.info
cargo test --profile dev --workspace -- --test-threads=1
- name: Generate coverage info
run: |
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov report --lcov --output-path lcov.info
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
files: lcov.info
debug: true