Skip to content

Commit

Permalink
Change groups for testing (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexChetverov authored Apr 12, 2024
2 parents 155e27b + cd32081 commit 5f2f864
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 57 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/branch-eth-rollup-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
82 changes: 41 additions & 41 deletions .github/workflows/reusable-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -202,12 +202,16 @@ 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: Test Report
uses: dorny/[email protected]
continue-on-error: true
Expand Down Expand Up @@ -239,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
Expand All @@ -248,36 +252,32 @@ 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/[email protected]
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
run: |
docker kill $(docker ps -q) 2>/dev/null && echo $?
docker-compose down -v

test-complete:
needs: [setup-report, e2e-test-matrix]
Expand Down

0 comments on commit 5f2f864

Please sign in to comment.