-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
20,247 additions
and
23,236 deletions.
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
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
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 |
---|---|---|
@@ -1,147 +1,122 @@ | ||
name: Run e2e tests | ||
name: Run e2e | ||
on: | ||
workflow_call: | ||
inputs: | ||
e2eBranch: | ||
type: string | ||
required: false | ||
substrateNodeVersion: | ||
type: string | ||
required: false | ||
default: 'eth-rollup-develop' | ||
globalVersion: | ||
type: string | ||
required: false | ||
default: '8dd0c81aa88b967334d001d8cae031f8799a189f' | ||
pull_request: | ||
types: [opened, synchronize, closed] | ||
|
||
workflow_dispatch: | ||
inputs: | ||
e2eBranch: | ||
type: string | ||
required: false | ||
substrateNodeVersion: | ||
type: string | ||
required: false | ||
default: 'eth-rollup-develop' | ||
globalVersion: | ||
type: string | ||
required: false | ||
default: '8dd0c81aa88b967334d001d8cae031f8799a189f' | ||
inputs: | ||
e2eBranch: | ||
description: '' | ||
required: false | ||
default: 'eth-rollup-develop' | ||
|
||
permissions: | ||
contents: read | ||
actions: read | ||
contents: write | ||
id-token: write | ||
deployments: write | ||
checks: write | ||
|
||
env: | ||
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
DEFAULT_E2E_REPO_BRANCH: eth-rollup-develop | ||
AVS_AGGREGATOR_VERSION: ${{ inputs.globalVersion }} | ||
AVS_FINALIZER_VERSION: ${{ inputs.globalVersion }} | ||
ROLLUP_SEQUENCER_VERSION: ${{ inputs.globalVersion }} | ||
ROLLUP_UPDATER_VERSION: ${{ inputs.globalVersion }} | ||
MANGATA_NODE_VERSION: ${{ inputs.substrateNodeVersion }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run-e2e-tests: | ||
init: | ||
name: Set global version | ||
if: github.event.action != 'closed' | ||
runs-on: ubuntu-latest | ||
outputs: | ||
GLOBAL_VERSION: ${{ steps.set_vars.outputs.GLOBAL_VERSION }} | ||
steps: | ||
- name: Set global version | ||
id: set_vars | ||
run: echo "GLOBAL_VERSION=${{ github.sha }}" >> $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 | ||
submodules: 'recursive' | ||
|
||
#- name: build finalizer | ||
# working-directory: avs-finalizer/ | ||
# run: cargo +stable build --release | ||
|
||
- name: Start env | ||
run: docker compose up -d --wait | ||
|
||
- name: Use custom branch in e2e tests repository if it exists, otherwise use default branch | ||
id: e2e | ||
run: | | ||
# Implementation of this conditional action was taken from here: | ||
# https://github.com/actions/checkout/issues/512#issuecomment-1264735491 | ||
# This condition check if the input 'e2eBranch' is empty, and if it is, it checks if the current branch name exists in 'mangata-e2e' repository | ||
if [[ -z "${{ inputs.e2eBranch }}" ]]; then | ||
# Checking if current branch name exists in 'mangata-e2e' repository | ||
if git ls-remote --heads --quiet --exit-code https://github.com/mangata-finance/mangata-e2e.git ${{ env.CURRENT_BRANCH }}; then | ||
echo "Using custom '${{ env.CURRENT_BRANCH }}' branch as it exists in 'mangata-e2e' repository" | ||
echo "BRANCH=${{ env.CURRENT_BRANCH }}" >> $GITHUB_OUTPUT | ||
else | ||
echo "Custom branch '${{ env.CURRENT_BRANCH }}' does not exist in 'mangata-e2e' repository, using default '${{ env.DEFAULT_E2E_REPO_BRANCH }}' branch" | ||
echo "BRANCH=${{ env.DEFAULT_E2E_REPO_BRANCH }}" >> $GITHUB_OUTPUT | ||
fi | ||
else | ||
echo "Using '${{ inputs.e2eBranch }}' branch fo 'mangata-e2e' repository as it was provided in the input" | ||
echo "BRANCH=${{ inputs.e2eBranch }}" >> $GITHUB_OUTPUT | ||
fi | ||
export AVS_AGGREGATOR_VERSION=8dd0c81aa88b967334d001d8cae031f8799a189f | ||
export AVS_FINALIZER_VERSION=8dd0c81aa88b967334d001d8cae031f8799a189f | ||
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 | ||
# if we have something in e2eBranch - override E2EBranchName, else -> E2EBRANCHNAME , that | ||
# by default will be main. | ||
run: echo "E2EBRANCHNAME=${{ inputs.e2eBranch || 'eth-rollup-develop' }}" >> $GITHUB_ENV | ||
|
||
- name: Checkout tests | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: mangata-finance/mangata-e2e | ||
ref: ${{ steps.e2e.outputs.BRANCH }} | ||
ref: "eth-rollup-develop" | ||
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 | ||
run: "yarn test-rollup" | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=12288 | ||
|
||
- name: Get sequencer logs | ||
- 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] | ||
if: success() || failure() | ||
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 | ||
path: e2eTests/reports/*.xml | ||
reporter: jest-junit | ||
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 | ||
|
||
run-avs-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Start env | ||
run: docker compose up -d --wait | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
- name: build and copy contracts | ||
working-directory: contracts | ||
- name: Stop env | ||
if: success() || failure() # run this step even if previous step failed | ||
run: | | ||
forge build | ||
cp out/FinalizerTaskManager.sol/FinalizerTaskManager.json ../avs-finalizer/tests/abis/FinalizerTaskManager.json | ||
cp out/IndexRegistryStorage.sol/IndexRegistryStorage.json ../avs-finalizer/tests/abis/IndexRegistryStorage.json | ||
cp out/RegistryCoordinator.sol/RegistryCoordinator.json ../avs-finalizer/tests/abis/RegistryCoordinator.json | ||
cp out/RegistryCoordinatorStorage.sol/RegistryCoordinatorStorage.json ../avs-finalizer/tests/abis/RegistryCoordinatorStorage.json | ||
- name: FINALIZER tests - install deps | ||
working-directory: avs-finalizer/tests/ | ||
run: yarn install | ||
|
||
- name: FINALIZER tests - run tests | ||
working-directory: avs-finalizer/tests/ | ||
run: yarn test | ||
export AVS_AGGREGATOR_VERSION=8dd0c81aa88b967334d001d8cae031f8799a189f | ||
export AVS_FINALIZER_VERSION=8dd0c81aa88b967334d001d8cae031f8799a189f | ||
docker compose down -v | ||
- name: Get avs-aggregator logs | ||
if: success() || failure() | ||
run: docker logs rollup-avs-aggregator-1 | ||
- name: Get avs-finalizer logs | ||
if: success() || failure() | ||
run: docker logs rollup-avs-finalizer-1 | ||
|
||
- name: Get anvil logs | ||
if: success() || failure() | ||
run: docker logs rollup-anvil-1 | ||
|
||
- run: docker ps | ||
|
||
|
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
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
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
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
Submodule avs-eigensdk-go
updated
from a33523 to 57cee9
Oops, something went wrong.