This repository has been archived by the owner on Dec 5, 2021. It is now read-only.
forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 6
wallet deployer + integration test #33
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9344484
enable latest tag
InoMurko 75e6b9a
build hardhat
InoMurko a18f00a
build hardhat - set context
InoMurko 21ac7b8
integration context
InoMurko a491087
no need for docker compose
InoMurko e7293c3
omgx wallet deployer
InoMurko d7344a5
omgx wallet deployer
InoMurko f22cd25
cleanup unused
InoMurko 4a73bd9
cleanup unused - L2DepositedERC20 if test
InoMurko 587af6b
http request to deployer node
InoMurko e9e78e1
dont need hardhat deploy ethers
InoMurko 3c7690a
dump folder
InoMurko b580c66
dump folder
InoMurko d14adef
wallet node stands up and waits for l1 and l2, omgx integration test
InoMurko 31373bd
rename omgx integration
InoMurko 07a628f
rename omgx integration add dist folder to wallet
InoMurko c6f69db
dist folder rm
InoMurko d7292f2
revert dependencies changes
InoMurko 0e9ed78
create and build and push better images
InoMurko 022c718
push containers to omgx repo
InoMurko f7728fb
list all images on failure, prevent container building on PRs
InoMurko 5a7528e
list corrent images with tags when pushing them to omgx repo
InoMurko 02959e3
revert OVM_L1CrossDomainMessenger changes
InoMurko 4e000e0
increase timeout
InoMurko b0c3cdd
correctly comment out step
InoMurko 3be9390
remove watchers from wallet deployment scripts, init pools
InoMurko bc5f47b
register eth in pools
InoMurko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
name: omgx_integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'develop' | ||
- '*rc' | ||
- 'regenesis/*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
omgx_integration: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
COMPOSE_DOCKER_CLI_BUILD: 1 | ||
steps: | ||
# Monorepo tests | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
|
||
- name: Install yq | ||
run: sudo snap install yq | ||
|
||
- name: Bring the stack up + OMGX | ||
working-directory: ./ops | ||
env: | ||
BUILD: 1 | ||
DAEMON: 1 | ||
run: ./up_local.sh | ||
|
||
- name: Background logs | ||
working-directory: ./ops | ||
run: docker-compose -f docker-compose-omgx.yml -f docker-compose-omgx-services.yml logs --follow & | ||
|
||
- name: Run the integration tests | ||
working-directory: ./ops | ||
run: docker-compose run integration_tests | ||
|
||
# Examples Tests | ||
- name: Test & deploy hardhat-example on Ethereum (regression) | ||
working-directory: ./examples/hardhat | ||
run: | | ||
yarn | ||
yarn deploy | ||
yarn test:integration | ||
|
||
- name: Test & deploy hardhat-example on Optimistic Ethereum | ||
working-directory: ./examples/hardhat | ||
run: | | ||
yarn deploy:ovm | ||
yarn test:integration:ovm | ||
|
||
- name: Test & deploy waffle-example on Ethereum (regression) | ||
working-directory: ./examples/waffle | ||
run: | | ||
yarn | ||
yarn compile | ||
yarn test:integration | ||
|
||
- name: Test & deploy waffle-example on Optimistic Ethereum | ||
working-directory: ./examples/waffle | ||
run: | | ||
yarn compile:ovm | ||
yarn test:integration:ovm | ||
|
||
- name: Test & deploy truffle-example on Ethereum (regression) | ||
working-directory: ./examples/truffle | ||
run: | | ||
yarn | ||
yarn compile | ||
yarn test:integration | ||
yarn deploy | ||
|
||
- name: Test & deploy truffle-example on Optimistic Ethereum | ||
working-directory: ./examples/truffle | ||
run: | | ||
yarn compile:ovm | ||
yarn test:integration:ovm | ||
yarn deploy:ovm | ||
|
||
- name: Test serving Wallet contracts | ||
working-directory: ./ | ||
run: | | ||
RETRIES=60 | ||
URL=http://127.0.0.1:8078/addresses.json | ||
until $(curl --silent --fail --output /dev/null "$URL"); do | ||
sleep 20s | ||
echo "Will wait $((RETRIES--)) more times for $URL to be up..." | ||
|
||
if [ "$RETRIES" -lt 0 ]; then | ||
echo "Timeout waiting for contract deployment" | ||
exit 1 | ||
fi | ||
done | ||
echo "Wallet contracts are deployed" | ||
L2LIQUIDITY_POOL=$(curl --silent $URL | jq -r .L2LiquidityPool) | ||
echo $L2LIQUIDITY_POOL | ||
if [[ $L2LIQUIDITY_POOL =~ "0x" ]]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
|
||
- name: Test l1-l2-deposit-withdrawal example on Optimistic Ethereum with cross-domain message passing | ||
working-directory: ./examples/l1-l2-deposit-withdrawal | ||
run: | | ||
yarn | ||
yarn compile | ||
yarn compile:ovm | ||
yarn test:integration:ovm | ||
|
||
- name: List all built images | ||
if: failure() | ||
run: docker images | ||
|
||
- name: Collect docker logs on failure | ||
if: failure() | ||
uses: jwalton/gh-docker-logs@v1 | ||
with: | ||
images: 'omgx/builder,omgx/hardhat,omgx/deployer,omgx/data-transport-layer,omgx/l2geth,omgx/message-relayer,omgx/batch-submitter,omgx/l2geth,omgx/integration-tests,omgx/wallet_builder,omgx/wallet_deployer' | ||
dest: './logs' | ||
|
||
- name: Tar logs | ||
if: failure() | ||
run: tar cvzf ./logs.tgz ./logs | ||
|
||
- name: Upload logs to GitHub | ||
if: failure() | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: logs.tgz | ||
path: ./logs.tgz |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with this we ensure wallet deployer deploys contracts, later we will add wallet integration tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but we need to run all their integration tests so that we make sure our stack does not interfere with the correctness of the optimistic system