Skip to content

Commit 5911b5d

Browse files
Reenables ovm prod tests with minor fixes (#1278)
* Bring changes from previous attempts to fix ovm prod tests * Improvements to ops tool CI * Simplify get optimism revert reason
1 parent c5b902f commit 5911b5d

17 files changed

+19933
-14693
lines changed

.circleci/config.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,38 @@ jobs:
146146
- checkout
147147
- attach_workspace:
148148
at: .
149-
- run: echo Disabled until ops tool is fixed by Optimism
149+
- run:
150+
name: Build docker containers
151+
command: |
152+
git clone git@github.com:ethereum-optimism/optimism.git
153+
cd optimism
154+
git fetch
155+
git checkout develop
156+
git pull origin develop
157+
yarn
158+
yarn build
159+
cd ops
160+
export COMPOSE_DOCKER_CLI_BUILD=1
161+
export DOCKER_BUILDKIT=1
162+
docker-compose build --parallel
163+
- run:
164+
name: Start chains
165+
background: true
166+
command: |
167+
cd optimism/ops
168+
docker-compose up -d
169+
- cmd-wait-for-port:
170+
port: 8545
171+
- cmd-wait-for-port:
172+
port: 9545
173+
- run:
174+
name: Deploy OVM Synthetix instances
175+
command: |
176+
node publish deploy-ovm-pair
177+
- run:
178+
name: Run OVM production tests
179+
command: |
180+
npm run test:prod:ovm
150181
job-prod-tests:
151182
working_directory: ~/repo
152183
docker:

.circleci/src/jobs/job-prod-tests-ovm.yml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,34 @@ steps:
66
- attach_workspace:
77
at: .
88
- run:
9-
echo Disabled until ops tool is fixed by Optimism
10-
# - run:
11-
# name: Build docker containers
12-
# command: |
13-
# git clone git@github.com:ethereum-optimism/optimism.git
14-
# cd optimism
15-
# yarn
16-
# cd ops
17-
# export COMPOSE_DOCKER_CLI_BUILD=1
18-
# export DOCKER_BUILDKIT=1
19-
# docker-compose build
20-
# - run:
21-
# name: Start chains
22-
# background: true
23-
# command: |
24-
# cd optimism/ops
25-
# docker-compose up -d
26-
# - cmd-wait-for-port:
27-
# port: 8545
28-
# - cmd-wait-for-port:
29-
# port: 9545
30-
# - run:
31-
# name: Deploy OVM Synthetix instances
32-
# command: |
33-
# node publish deploy-ovm-pair
34-
# - run:
35-
# name: Run OVM production tests
36-
# command: |
37-
# npm run test:prod:ovm
9+
name: Build docker containers
10+
command: |
11+
git clone git@github.com:ethereum-optimism/optimism.git
12+
cd optimism
13+
git fetch
14+
git checkout develop
15+
git pull origin develop
16+
yarn
17+
yarn build
18+
cd ops
19+
export COMPOSE_DOCKER_CLI_BUILD=1
20+
export DOCKER_BUILDKIT=1
21+
docker-compose build --parallel
22+
- run:
23+
name: Start chains
24+
background: true
25+
command: |
26+
cd optimism/ops
27+
docker-compose up -d
28+
- cmd-wait-for-port:
29+
port: 8545
30+
- cmd-wait-for-port:
31+
port: 9545
32+
- run:
33+
name: Deploy OVM Synthetix instances
34+
command: |
35+
node publish deploy-ovm-pair
36+
- run:
37+
name: Run OVM production tests
38+
command: |
39+
npm run test:prod:ovm

hardhat/tasks/task-test-prod-ovm.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const { task } = require('hardhat/config');
2+
3+
task('test:prod:ovm', 'run optimism production tests against a running ops instance')
4+
.addOptionalParam(
5+
'providerUrl',
6+
'The target providerUrl where the ops instance will be running',
7+
'http://localhost'
8+
)
9+
.setAction(async (taskArguments, hre) => {
10+
hre.config.paths.tests = './test/optimism/';
11+
hre.config.providerUrl = taskArguments.providerUrl;
12+
13+
const timeout = 5 * 60 * 1000;
14+
hre.config.mocha.timeout = timeout;
15+
hre.config.mocha.bail = false;
16+
hre.config.networks.localhost.timeout = timeout;
17+
18+
taskArguments.maxMemory = true;
19+
20+
await hre.run('test', taskArguments);
21+
});

0 commit comments

Comments
 (0)