Skip to content

Commit

Permalink
ci: run and publish integration tests to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed May 1, 2021
1 parent a3e3e13 commit 416a67d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,13 @@ jobs:
working-directory: ./ops
run: ./scripts/build-ci.sh

- name: Run the integration tests
working-directory: ./integration-tests
run: |
yarn build:contracts
yarn build:contracts:ovm
yarn test:integration
env:
FORCE_COLOR: 1
ENABLE_GAS_REPORT: 1
- name: Bring the stack up
working-directory: ./ops
run: docker-compose up -d

- name: Print gas report
run: cat integration-tests/gas-report.txt
- name: Run the integration tests
working-directory: ./ops
run: docker-compose run integration_tests

# Examples Tests
- name: Test & deploy hardhat-example on hardhat (regression)
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
message-relayer: ${{ needs.release.outputs.message-relayer }}
data-transport-layer: ${{ needs.release.outputs.data-transport-layer }}
contracts: ${{ needs.release.outputs.contracts }}
integration-tests: ${{ needs.release.outputs.integration-tests }}

steps:
- name: Checkout
Expand Down Expand Up @@ -228,3 +229,29 @@ jobs:
file: ./ops/docker/Dockerfile.deployer
push: true
tags: ethereumoptimism/deployer:${{ needs.builder.outputs.contracts }}

integration_tests:
name: Publish Integration tests ${{ needs.builder.outputs.integration-tests }}
needs: builder
if: needs.builder.outputs.integration-tests != ''
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.integration-tests
push: true
tags: ethereumoptimism/integration-tests:${{ needs.builder.outputs.integration-tests }}
2 changes: 1 addition & 1 deletion ops/scripts/build-ci.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# build in 2 steps
function build_images() {
docker-compose build --parallel -- builder l2geth l1_chain
docker-compose build --parallel -- deployer dtl batch_submitter relayer
docker-compose build --parallel -- deployer dtl batch_submitter relayer integration_test
}

function build_dependencies() {
Expand Down

0 comments on commit 416a67d

Please sign in to comment.