Feature/minor fixes #197
Workflow file for this run
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
name: Run e2e | |
on: | |
pull_request: | |
types: [opened, synchronize, closed] | |
workflow_dispatch: | |
inputs: | |
e2eBranch: | |
description: 'branch name for e2e tests' | |
required: false | |
default: 'eth-rollup-develop' | |
nodeVersion: | |
description: 'image tag for rollup-node' | |
required: false | |
default: 'eth-rollup-develop' | |
avsVersion: | |
description: 'image tag for avs-aggregator and avs-finalizer' | |
required: false | |
default: '8dd0c81aa88b967334d001d8cae031f8799a189f' | |
permissions: | |
contents: write | |
id-token: write | |
deployments: write | |
checks: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
init: | |
name: Set global version | |
if: github.event.action != 'closed' | |
runs-on: ubuntu-latest | |
outputs: | |
GLOBAL_VERSION: ${{ steps.set_vars.outputs.GLOBAL_VERSION }} | |
NODE_VERSION: ${{ steps.set_vars.outputs.NODE_VERSION }} | |
AVS_VERSION: ${{ steps.set_vars.outputs.AVS_VERSION }} | |
steps: | |
- name: Set global version | |
id: set_vars | |
run: | | |
echo "GLOBAL_VERSION=${{ github.sha }}" >> $GITHUB_OUTPUT | |
echo "NODE_VERSION=${{ inputs.nodeVersion || 'eth-rollup-develop' }}" >> $GITHUB_OUTPUT | |
echo "AVS_VERSION=${{ inputs.avsVersion || '8dd0c81aa88b967334d001d8cae031f8799a189f' }}" >> $GITHUB_OUTPUT | |
#build-and-test: | |
#needs: [init] | |
#name: Build | |
#uses: ./.github/workflows/reusable-build-and-test.yml | |
#secrets: inherit | |
#with: | |
#version: ${{ needs.init.outputs.GLOBAL_VERSION }} | |
start-env: | |
runs-on: [ubuntu-latest] | |
needs: [init] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
#- name: build finalizer | |
# working-directory: avs-finalizer/ | |
# run: cargo +stable build --release | |
- name: Start env | |
run: | | |
export AVS_AGGREGATOR_VERSION=${{ needs.init.outputs.AVS_VERSION }} | |
export AVS_FINALIZER_VERSION=${{ needs.init.outputs.AVS_VERSION }} | |
export MANGATA_NODE_VERSION=${{ needs.init.outputs.NODE_VERSION }} | |
docker compose build sequencer updater | |
docker compose up --wait | |
# - name: Sleep for 2 minutes | |
# run: sleep 120s | |
- name: docker ps | |
run: docker ps | |
- name: Decide if main - branch or parameter | |
run: echo "E2EBRANCHNAME=${{ inputs.e2eBranch || 'eth-rollup-develop' }}" >> $GITHUB_ENV | |
- name: Checkout tests | |
uses: actions/checkout@v4 | |
with: | |
repository: mangata-finance/mangata-e2e | |
ref: "${{ env.E2EBRANCHNAME }}" | |
path: e2eTests | |
- name: Install e2e tests dependencies | |
working-directory: e2eTests | |
run: yarn install | |
- name: restart sequencer | |
run: docker restart rollup-sequencer-1 | |
- name: Run tests | |
working-directory: e2eTests | |
run: "yarn test-rollup" | |
env: | |
NODE_OPTIONS: --max_old_space_size=12288 | |
ERC20_CONTRACT_ADDRESS: "0x82e01223d51Eb87e16A03E24687EDF0F294da6f1" | |
AVS_TASK_MANAGER_ADDRESS: "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8" | |
MANGATA_CONTRACT_ADDRESS: "0xcd8a1c3ba11cf5ecfa6267617243239504a98d90" | |
- name: Get Seq logs | |
if: success() || failure() | |
run: docker logs rollup-sequencer-1 | |
- name: Get updater logs | |
if: success() || failure() | |
run: docker logs rollup-updater-1 | |
- name: Test Report | |
uses: dorny/[email protected] | |
continue-on-error: true | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: E2E report test-rollup # Name of the check run which will be created | |
path: e2eTests/reports/*.xml # Path to test results | |
reporter: jest-junit # Format of test results | |
- name: Stop env | |
if: success() || failure() # run this step even if previous step failed | |
run: | | |
export AVS_AGGREGATOR_VERSION=8dd0c81aa88b967334d001d8cae031f8799a189f | |
export AVS_FINALIZER_VERSION=8dd0c81aa88b967334d001d8cae031f8799a189f | |
docker compose down -v | |