-
Notifications
You must be signed in to change notification settings - Fork 15
96 lines (81 loc) · 2.43 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
name: Task - Rust Tests & Coverage
on:
pull_request_target:
branches:
- main
types: [opened, synchronize, reopened]
push:
branches-ignore:
- main
workflow_call:
workflow_dispatch:
jobs:
coverage:
runs-on: ubuntu-latest
services:
localstack:
image: localstack/localstack
env:
SERVICES: s3, sqs
DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: "AWS_ACCESS_KEY_ID"
AWS_SECRET_ACCESS_KEY: "AWS_SECRET_ACCESS_KEY"
ports:
- 4566:4566
mongodb:
image: mongo:latest
ports:
- 27017:27017
steps:
- uses: actions/checkout@v3
# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- run: rustup show
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Check Anvil Installation
run: |
if command -v anvil &> /dev/null
then
echo "Anvil is installed. Version information:"
anvil --version
else
echo "Anvil is not installed or not in PATH"
exit 1
fi
- name: Clean workspace
run: |
cargo llvm-cov clean --workspace
- name: Run llvm-cov
env:
ETHEREUM_BLAST_RPC_URL: ${{ secrets.ETHEREUM_BLAST_RPC_URL }}
run: |
cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
files: lcov.info
debug: true
- uses: colpal/actions-clean@v1
if: ${{ always() }} # To ensure this step runs even when earlier steps fail