Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,48 @@ jobs:
job-integration-tests:
working_directory: ~/repo
machine:
image: ubuntu-2004:202010-01
image: ubuntu-2004:202104-01
docker_layer_caching: true
resource_class: large
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
keys:
- v5-optimism-build-
- run:
name: Build docker containers if necessary
command: |
if [ ! -d ./optimism ]; then
npx hardhat ops --fresh --build --build-ops
fi;
- save_cache:
key: v5-optimism-build-
paths:
- ./optimism
- run:
name: Start docker chains
background: true
command: |
npx hardhat node
docker --version
npx hardhat ops --start
- cmd-wait-for-port:
port: 8545
- cmd-wait-for-port:
port: 9545
- run:
name: Run isolated layer 1 integration tests
command: |
npx hardhat test:integration:l1 --compile --deploy
npx hardhat test:integration:l1 --compile --deploy --provider-port 9545
- run:
name: Run isolated layer 2 integration tests
command: |
npx hardhat test:integration:l2 --compile --deploy
- run:
name: Run dual layer 1 and layer 2 integration tests
command: |
npx hardhat test:integration:dual --deploy
job-lint:
working_directory: ~/repo
docker:
Expand Down Expand Up @@ -318,7 +342,7 @@ workflows:
requires:
- job-prepare
- job-integration-tests:
name: job-integration-tests-simplified
name: job-integration-tests
requires:
- job-prepare
- job-pack-browser:
Expand Down
53 changes: 25 additions & 28 deletions .circleci/src/jobs/job-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,38 @@ steps:
- checkout
- attach_workspace:
at: .
# - restore_cache:
# keys:
# - v4-optimism-build-{{ checksum "package-lock.json" }}
# - run:
# name: Build docker containers if necessary
# command: |
# if [ ! -d ./optimism ]; then
# npx hardhat ops --fresh --build --build-ops
# fi;
# - save_cache:
# key: v4-optimism-build-{{ checksum "package-lock.json" }}
# paths:
# - ./optimism
- restore_cache:
keys:
- v5-optimism-build-{{ checksum "package-lock.json" }}
- run:
name: Build docker containers if necessary
command: |
if [ ! -d ./optimism ]; then
npx hardhat ops --fresh --build --build-ops
fi;
- save_cache:
key: v5-optimism-build-{{ checksum "package-lock.json" }}
paths:
- ./optimism
- run:
name: Start docker chains
background: true
command: |
docker --version
npx hardhat node
# npx hardhat ops --start
npx hardhat ops --start
- cmd-wait-for-port:
port: 8545
# - cmd-wait-for-port:
# port: 9545
- cmd-wait-for-port:
port: 9545
- run:
name: Run isolated layer 1 integration tests
command: |
# npx hardhat test:integration:l1 --compile --deploy --provider-port 9545
npx hardhat test:integration:l1 --compile --deploy
# TODO: Disabled until the ops tool becomes more stable
# - run:
# name: Run isolated layer 2 integration tests
# command: |
# npx hardhat test:integration:l2 --compile --deploy
# - run:
# name: Run dual layer 1 and layer 2 integration tests
# command: |
# npx hardhat test:integration:dual --deploy
npx hardhat test:integration:l1 --compile --deploy --provider-port 9545
- run:
name: Run isolated layer 2 integration tests
command: |
npx hardhat test:integration:l2 --compile --deploy
- run:
name: Run dual layer 1 and layer 2 integration tests
command: |
npx hardhat test:integration:dual --deploy
2 changes: 1 addition & 1 deletion .circleci/src/snippets/job-header-machine.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
working_directory: ~/repo
machine:
image: ubuntu-2004:202010-01
image: ubuntu-2004:202104-01
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to use 202104-01 ubuntu image that has docker 20.10.6 (see reference here)

docker_layer_caching: true
2 changes: 1 addition & 1 deletion .circleci/src/workflows/workflow-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Integration tests
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- job-integration-tests:
name: job-integration-tests-simplified
name: job-integration-tests
{{> require-prepare.yml}}

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion test/integration/utils/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function bootstrapDual({ ctx }) {
ctx.l2.provider = _setupProvider({
url: `${hre.config.providerUrl}:${hre.config.providerPortL2}`,
});
ctx.provider.getGasPrice = () => ethers.utils.parseUnits(OVM_GAS_PRICE_GWEI, 'gwei');
ctx.l2.provider.getGasPrice = () => ethers.utils.parseUnits(OVM_GAS_PRICE_GWEI, 'gwei');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix on the run


await setupOptimismWatchers({ ctx, providerUrl: hre.config.providerUrl });

Expand Down