Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

wallet deployer + integration test #33

Merged
merged 27 commits into from
Jun 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9344484
enable latest tag
InoMurko Jun 1, 2021
75e6b9a
build hardhat
InoMurko Jun 1, 2021
a18f00a
build hardhat - set context
InoMurko Jun 1, 2021
21ac7b8
integration context
InoMurko Jun 1, 2021
a491087
no need for docker compose
InoMurko Jun 1, 2021
e7293c3
omgx wallet deployer
InoMurko Jun 10, 2021
d7344a5
omgx wallet deployer
InoMurko Jun 11, 2021
f22cd25
cleanup unused
InoMurko Jun 11, 2021
4a73bd9
cleanup unused - L2DepositedERC20 if test
InoMurko Jun 11, 2021
587af6b
http request to deployer node
InoMurko Jun 12, 2021
e9e78e1
dont need hardhat deploy ethers
InoMurko Jun 12, 2021
3c7690a
dump folder
InoMurko Jun 12, 2021
b580c66
dump folder
InoMurko Jun 12, 2021
d14adef
wallet node stands up and waits for l1 and l2, omgx integration test
InoMurko Jun 14, 2021
31373bd
rename omgx integration
InoMurko Jun 14, 2021
07a628f
rename omgx integration add dist folder to wallet
InoMurko Jun 14, 2021
c6f69db
dist folder rm
InoMurko Jun 14, 2021
d7292f2
revert dependencies changes
InoMurko Jun 14, 2021
0e9ed78
create and build and push better images
InoMurko Jun 15, 2021
022c718
push containers to omgx repo
InoMurko Jun 15, 2021
f7728fb
list all images on failure, prevent container building on PRs
InoMurko Jun 15, 2021
5a7528e
list corrent images with tags when pushing them to omgx repo
InoMurko Jun 15, 2021
02959e3
revert OVM_L1CrossDomainMessenger changes
InoMurko Jun 16, 2021
4e000e0
increase timeout
InoMurko Jun 16, 2021
b0c3cdd
correctly comment out step
InoMurko Jun 16, 2021
3be9390
remove watchers from wallet deployment scripts, init pools
InoMurko Jun 18, 2021
bc5f47b
register eth in pools
InoMurko Jun 18, 2021
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
146 changes: 146 additions & 0 deletions .github/workflows/omgx-integration.yml
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
Copy link
Author

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

Copy link
Author

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

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
Loading