Skip to content

Commit d7a2d4c

Browse files
committed
feat: run core integration tests via docker
1 parent 1f991fb commit d7a2d4c

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Normal vote CI Core Integration Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- "master"
7+
- "feat/tests"
8+
- "feat/rc3"
9+
- "feat/rc2"
10+
- "feat/rc1"
11+
- "feat/next-vote"
12+
schedule:
13+
- cron: "0 0 * * TUE"
14+
jobs:
15+
run-tests:
16+
name: Run all tests on NORMAL runner
17+
runs-on: "ubuntu-latest"
18+
timeout-minutes: 100
19+
20+
services:
21+
hardhat-node:
22+
image: ghcr.io/lidofinance/hardhat-node:2.22.19.3-shanghai
23+
ports:
24+
- 8545:8545
25+
env:
26+
ETH_RPC_URL: "https://mainnet.infura.io/v3/${{ secrets.WEB3_INFURA_PROJECT_ID }}"
27+
28+
hardhat-node-fork:
29+
image: ghcr.io/lidofinance/hardhat-node:2.22.19.3-shanghai
30+
ports:
31+
- 8555:8545
32+
env:
33+
ETH_RPC_URL: "http://hardhat-node:8545"
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Check that the fork is ready
39+
shell: bash
40+
run: timeout 30 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' 127.0.0.1 8545
41+
42+
- name: Execute vote
43+
uses: ./.github/actions/execute_vote
44+
with:
45+
vote: "normal"
46+
infura: ${{ secrets.WEB3_INFURA_PROJECT_ID }}
47+
etherscan: ${{ secrets.ETHERSCAN_TOKEN }}
48+
49+
- name: Checkout deployed-mainnet-upgrade.json
50+
uses: actions/checkout@v4
51+
with:
52+
repository: lidofinance/core
53+
path: core
54+
ref: feat/vaults
55+
sparse-checkout: true
56+
sparse-checkout-paths: |
57+
deployed-mainnet-upgrade.json
58+
59+
- name: Pull Core Integration Tests Image
60+
run: docker pull ghcr.io/lidofinance/core-integration-tests:latest
61+
62+
- name: Run Core Integration Tests
63+
run: |
64+
docker run \
65+
--env RPC_URL=http://host.docker.internal:8555 \
66+
--env NETWORK_STATE_FILE=deployed-mainnet-upgrade.json \
67+
--add-host=host.docker.internal:host-gateway \
68+
-v $(pwd)/deployed-mainnet-upgrade.json:/app/deployed-mainnet-upgrade.json \
69+
ghcr.io/lidofinance/core-integration-tests:latest
70+

0 commit comments

Comments
 (0)