Skip to content

test: ci migration testing #13

test: ci migration testing

test: ci migration testing #13

name: Migration Testing
on:
workflow_dispatch:
pull_request:
branches: [main]
jobs:
check:
strategy:
fail-fast: true
name: Migration Testing
runs-on: [self-hosted, Linux, large, ephemeral]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Use Node.js [18.15]
uses: actions/setup-node@v3
with:
node-version: 18.15
cache: npm
- name: Create .env file
run: cp local.env .env
- name: Install dependencies
run: npm ci
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Start the local node with 0.48.1
run: cd node_modules/@hashgraph/hedera-local/ && node build/index.js restart -d --full --network-tag=0.48.1
timeout-minutes: 5
- name: Run @pre-migration tests
run: npx hardhat test --grep @pre-migration
timeout-minutes: 5
- name: Freeze the network
run: npx hardhat run scripts/freeze-network-node.js
timeout-minutes: 5
- name: Stop docker containers (network node)
run: cd node_modules/@hashgraph/hedera-local/ && docker stop network-node haveged
timeout-minutes: 5
- name: Stop docker containers (peripheral services)
run: cd node_modules/@hashgraph/hedera-local/ &&
docker stop minio mirror-node-importer mirror-node-grpc mirror-node-monitor account-balances-uploader record-sidecar-uploader record-streams-uploader
timeout-minutes: 5
- name: Delete docker volumes
run: cd node_modules/@hashgraph/hedera-local/ &&
docker rm --volumes minio mirror-node-importer mirror-node-grpc mirror-node-monitor account-balances-uploader record-sidecar-uploader record-streams-uploader
timeout-minutes: 5
- name: Run the local node with 0.49.5
run: cd node_modules/@hashgraph/hedera-local/ && docker compose -f docker-compose-state-migration.yml up -d
timeout-minutes: 5
- name: Run @post-migration tests
run: npx hardhat test --grep @post-migration
timeout-minutes: 5