Skip to content

Commit

Permalink
tests(ci): add workflow for trigger upgrade hub e2e-test (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhductn2001 authored May 19, 2024
1 parent d4dc3e4 commit 1da2123
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/e2e_test_upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: E2E Tests Upgrade

on:
workflow_dispatch:
pull_request:
types:
# trigger workflow if PR is opened directly as R4R.
- opened
# trigger workflow if changes are pushed to the branch.
- synchronize
# trigger workflow if PR is marked ready for review.
- ready_for_review
paths:
- 'app/upgrades/**'

permissions:
contents: read
packages: write

jobs:
build-image:
runs-on: ubuntu-latest
outputs:
UPGRADE_NAME: ${{ steps.set-output.outputs.upgrade }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set environment variable
id: set-output
run: |
upgradeName=$(ls -d -- ./app/upgrades/v* | sort -Vr | head -n 1 | xargs basename)
echo "upgrade=$upgradeName" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and export
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
outputs: type=docker,dest=/tmp/e2e.tar
platforms: linux/amd64
tags: |
ghcr.io/dymensionxyz/dymension:e2e
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: e2e
path: /tmp/e2e.tar

e2e-tests-upgrade:
needs: build-image
uses: dymensionxyz/e2e-tests/.github/workflows/e2e-test-rollapp-wasm-upgrade-workflow-call.yml@main
with:
dymension_ci: "e2e"
upgrade_name: "${{ needs.build-image.outputs.UPGRADE_NAME }}"

0 comments on commit 1da2123

Please sign in to comment.