From ee60e770674ae6609cac267e8470a2470fb20f1a Mon Sep 17 00:00:00 2001 From: AlexChetverov Date: Wed, 10 Apr 2024 16:26:06 +0200 Subject: [PATCH 1/6] change e2e-test-matrix --- .github/workflows/reusable-e2e-tests.yml | 56 ++++++++++++------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 1e03f2197..6771acc85 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -95,36 +95,36 @@ jobs: fail-fast: false matrix: include: - - command: "yarn test-parallel --max-workers=10" - fast: false - - command: "yarn test-sequential-no-bootstrap" - fast: false - - command: "yarn test-seqgasless" - fast: false + # - command: "yarn test-parallel --max-workers=10" + # fast: false + # - command: "yarn test-sequential-no-bootstrap" + # fast: false + # - command: "yarn test-seqgasless" + # fast: false - command: "yarn test-maintenance" fast: true - - command: "yarn test-bootstrap" - fast: false - - command: "yarn test-rewards-bootstrap" - fast: false - - command: "yarn test-parallel-autocompound" - fast: true - - command: "yarn test-sequential-autocompound" - fast: true - - command: "yarn test-poolliquidity" - fast: true - - command: "yarn test-governance" - fast: true - - command: "yarn test-multiswap" - fast: false - - command: "yarn test-experimentalStaking" - fast: true - - command: "yarn test-crowdloan" - fast: false - - command: "yarn test-sdk" - fast: true - - command: "yarn test-parallel-3rdPartyRewards" - fast: true + # - command: "yarn test-bootstrap" + # fast: false + # - command: "yarn test-rewards-bootstrap" + # fast: false + # - command: "yarn test-parallel-autocompound" + # fast: true + # - command: "yarn test-sequential-autocompound" + # fast: true + # - command: "yarn test-poolliquidity" + # fast: true + # - command: "yarn test-governance" + # fast: true + # - command: "yarn test-multiswap" + # fast: false + # - command: "yarn test-experimentalStaking" + # fast: true + # - command: "yarn test-crowdloan" + # fast: false + # - command: "yarn test-sdk" + # fast: true + # - command: "yarn test-parallel-3rdPartyRewards" + # fast: true runs-on: [e2e-gke] timeout-minutes: 180 From 4d2c3c021f6cb0f80ed20e21cee57fb461630b2f Mon Sep 17 00:00:00 2001 From: goncer Date: Fri, 12 Apr 2024 09:35:14 +0200 Subject: [PATCH 2/6] debug job --- .github/workflows/reusable-e2e-tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 6771acc85..b51fa49db 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -202,12 +202,19 @@ jobs: - name: Sleep for 2 minutes run: sleep 120s + - name: Get docker status + run: docker ps + - name: Run tests working-directory: e2eTests run: ${{ matrix.command }} env: NODE_OPTIONS: --max_old_space_size=12288 + - name: Get node logs + if: failure() + run: docker logs mangata-node-node-alice-1 + - name: Test Report uses: dorny/test-reporter@v1.7.0 continue-on-error: true From e983d4c56e6dfe31cc218e41ac21748e2c995625 Mon Sep 17 00:00:00 2001 From: goncer Date: Fri, 12 Apr 2024 09:50:20 +0200 Subject: [PATCH 3/6] use rollup node instead of mangata-node --- .github/workflows/reusable-e2e-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index b51fa49db..5c25a8743 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -12,7 +12,7 @@ on: description: "Name of the parachain docker reference" type: string required: false - default: "mangatasolutions/rollup-node:latest" + default: "mangatasolutions/rollup-node:eth-rollup-develop" skipBuild: description: "Skip build phase" type: string @@ -38,7 +38,7 @@ on: description: "Name of the parachain docker reference" type: string required: false - default: "mangatasolutions/rollup-node:latest" + default: "mangatasolutions/rollup-node:eth-rollup-develop" skipBuild: description: "Skip build phase" type: string From 3a635bc9d4e7bfde763d2c1044e1374a0739cce8 Mon Sep 17 00:00:00 2001 From: goncer Date: Fri, 12 Apr 2024 09:58:09 +0200 Subject: [PATCH 4/6] enable e2e tests --- .../workflows/branch-eth-rollup-develop.yml | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/branch-eth-rollup-develop.yml b/.github/workflows/branch-eth-rollup-develop.yml index 717d634b8..b502ff35f 100644 --- a/.github/workflows/branch-eth-rollup-develop.yml +++ b/.github/workflows/branch-eth-rollup-develop.yml @@ -111,22 +111,21 @@ jobs: parachainDocker: ${{ github.event.inputs.nodeDockerImage }} globalVersion: ${{ needs.init.outputs.GLOBAL_VERSION }} - # TODO: Uncomment when e2e tests are aligned with solochain stuff - # run-e2e-test: - # name: Run e2e tests - # needs: [init, build-and-test, generate-types] - # uses: ./.github/workflows/reusable-e2e-tests.yml - # secrets: inherit - # permissions: - # contents: write - # id-token: write - # deployments: write - # checks: write - # with: - # e2eBranch: ${{ github.event.inputs.e2eBranch }} - # nodeDockerImage: ${{ github.event.inputs.nodeDockerImage }} - # skipBuild: 'false' - # globalVersion: ${{ needs.init.outputs.GLOBAL_VERSION }} + run-e2e-test: + name: Run e2e tests + needs: [init, build-and-test, generate-types] + uses: ./.github/workflows/reusable-e2e-tests.yml + secrets: inherit + permissions: + contents: write + id-token: write + deployments: write + checks: write + with: + e2eBranch: ${{ github.event.inputs.e2eBranch }} + nodeDockerImage: ${{ github.event.inputs.nodeDockerImage }} + skipBuild: 'false' + globalVersion: ${{ needs.init.outputs.GLOBAL_VERSION }} deploy-rollup-dev: name: Deploy to rollup-dev on every commit to `eth-rollup-develop` branch From 7d6aa2d6ecfa5634c10b1e0450d41c1fcd80aed3 Mon Sep 17 00:00:00 2001 From: goncer Date: Fri, 12 Apr 2024 10:10:41 +0200 Subject: [PATCH 5/6] fix some old parachain refs --- .github/workflows/reusable-e2e-tests.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 5c25a8743..1eb83b6c6 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -211,9 +211,6 @@ jobs: env: NODE_OPTIONS: --max_old_space_size=12288 - - name: Get node logs - if: failure() - run: docker logs mangata-node-node-alice-1 - name: Test Report uses: dorny/test-reporter@v1.7.0 @@ -246,7 +243,7 @@ jobs: - name: Prepare backup snapshots on workflow failure if: failure() env: - OUTPUT_DIR: devops/parachain-launch/output + OUTPUT_DIR: ./ run: | # Set MATRIX_COMMAND_PATH to be used as a directory name to store specifc test run snapshots echo "MATRIX_COMMAND_PATH=$(echo ${{ matrix.command }} | sed 's/[^a-zA-Z0-9]/-/g')" >> $GITHUB_ENV @@ -255,33 +252,34 @@ jobs: tar cvzf ${OUTPUT_DIR}/logs.tgz ./logs # Generate image snapshots - docker commit $(docker ps | grep parachain-2110-0 | awk '{print $1}') mangata_test_run/mangata_alice_1 + docker commit $(docker ps | grep mangata-node-node-alice-1 | awk '{print $1}') mangata_test_run/mangata_alice_1 docker save --output=${OUTPUT_DIR}/mangata_alice_1.tar mangata_test_run/mangata_alice_1 - docker commit $(docker ps | grep parachain-2110-1 | awk '{print $1}') mangata_test_run/mangata_bob_1 + docker commit $(docker ps | grep mangata-node-node-bob-1 | awk '{print $1}') mangata_test_run/mangata_bob_1 docker save --output=${OUTPUT_DIR}/mangata_bob_1.tar mangata_test_run/mangata_bob_1 # Generate volume snapshots - docker run -v output_parachain-2110-0:/volume --rm --log-driver none loomchild/volume-backup backup > ${OUTPUT_DIR}/mangata_alice_1_volume.tar.bz2 - docker run -v output_parachain-2110-1:/volume --rm --log-driver none loomchild/volume-backup backup > ${OUTPUT_DIR}/mangata_bob_1_volume.tar.bz2 + docker run -v data-alith:/volume --rm --log-driver none loomchild/volume-backup backup > ${OUTPUT_DIR}/mangata_alice_1_volume.tar.bz2 + docker run -v data-baltathar:/volume --rm --log-driver none loomchild/volume-backup backup > ${OUTPUT_DIR}/mangata_bob_1_volume.tar.bz2 - uses: google-github-actions/auth@v1 if: failure() with: workload_identity_provider: '${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' service_account: '${{ secrets.GCP_SERVICE_ACCOUNT }}' + - name: Upload node storage data to GCP bucket if: failure() uses: google-github-actions/upload-cloud-storage@v1.0.3 with: process_gcloudignore: false - path: devops/parachain-launch/output destination: mangata-node-ci-cache/${{ github.sha }}/${{ env.MATRIX_COMMAND_PATH }} + - name: Add GCP bucket URL link for stored node data on job failure if: failure() run: echo '[GCP Bucket link](https://console.cloud.google.com/storage/browser/mangata-node-ci-cache/${{ github.sha }}/${{ env.MATRIX_COMMAND_PATH }})' >> $GITHUB_STEP_SUMMARY - - name: Stop previous parachain if running - working-directory: devops/parachain-launch/output + - name: Stop docker instance + if: always() run: | docker kill $(docker ps -q) 2>/dev/null && echo $? docker-compose down -v From cd3208173c91aabea5c21a42fbc513e2e2f492e4 Mon Sep 17 00:00:00 2001 From: goncer Date: Fri, 12 Apr 2024 16:23:40 +0200 Subject: [PATCH 6/6] Update reusable-e2e-tests.yml --- .github/workflows/reusable-e2e-tests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/reusable-e2e-tests.yml b/.github/workflows/reusable-e2e-tests.yml index 1eb83b6c6..b9f785a9c 100644 --- a/.github/workflows/reusable-e2e-tests.yml +++ b/.github/workflows/reusable-e2e-tests.yml @@ -278,11 +278,6 @@ jobs: if: failure() run: echo '[GCP Bucket link](https://console.cloud.google.com/storage/browser/mangata-node-ci-cache/${{ github.sha }}/${{ env.MATRIX_COMMAND_PATH }})' >> $GITHUB_STEP_SUMMARY - - name: Stop docker instance - if: always() - run: | - docker kill $(docker ps -q) 2>/dev/null && echo $? - docker-compose down -v test-complete: needs: [setup-report, e2e-test-matrix]