-
Notifications
You must be signed in to change notification settings - Fork 124
145 lines (124 loc) · 4.36 KB
/
Copy pathevm.yml
File metadata and controls
145 lines (124 loc) · 4.36 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: EVM CI
on:
push:
branches:
- main
paths:
- "evm/**/*.sol"
- "evm/**/*.rs"
- "evm/**/Cargo.toml"
- "evm/**/foundry.toml"
- "evm/**/package.json"
- "evm/**/*.ts"
- "evm/**/*.js"
- ".github/workflows/evm.yml"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "evm/**/*.sol"
- "evm/**/*.rs"
- "evm/**/Cargo.toml"
- "evm/**/foundry.toml"
- "evm/**/package.json"
- ".github/workflows/evm.yml"
workflow_dispatch:
concurrency:
group: evm-ci-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
env:
FOUNDRY_PROFILE: default
CARGO_TERM_COLOR: always
MAINNET_FORK_URL: ${{ secrets.MAINNET_FORK_URL }}
jobs:
check-evm:
name: Check EVM Contracts
runs-on: ubuntu-latest
if: github.event.pull_request.draft != true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: "evm/pnpm-lock.yaml"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
- name: Run Forge build
run: |
cd evm
pnpm install
forge --version
forge build --sizes
id: build
- name: Run Forge tests
run: |
cd evm
pnpm install
forge test -vvv
id: test
integration-tests-rust:
name: Rust Integration Tests (revm)
runs-on: ubuntu-latest
if: github.event.pull_request.draft != true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: "evm/pnpm-lock.yaml"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "evm-integration-tests"
workspaces: |
. -> target
- name: Compile contracts (forge build)
run: |
cd evm
pnpm install
forge build
- name: Rust integration tests
run: |
cargo test -p evm-integration-tests --release -- --nocapture
- name: Beefy consensus integration test
timeout-minutes: 10
env:
RELAY_WS_URL: ${{ secrets.PASEO_RELAY_WS_URL }}
PARA_WS_URL: ${{ secrets.PASEO_PARA_WS_URL }}
PARA_ID: ${{ secrets.PASEO_PARA_ID }}
run: |
if [ -z "$RELAY_WS_URL" ] || [ -z "$PARA_WS_URL" ] || [ -z "$PARA_ID" ]; then
echo "::warning::Skipping live beefy test — PASEO_RELAY_WS_URL / PASEO_PARA_WS_URL / PASEO_PARA_ID secrets not set"
exit 0
fi
cargo test -p evm-integration-tests --release \
tests::ecdsa_beefy::test_beefy_consensus_client \
-- --ignored --nocapture