Wait for chopsticks in CI #576
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: E2E Tests | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Build | |
run: | | |
cargo build --release --locked | |
invalid-tx-tests: | |
needs: build | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Install dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Run chopsticks environment | |
run: | | |
npx @acala-network/chopsticks@latest xcm -r chopsticks_configs/paseo.yml \ | |
-p chopsticks_configs/paseo_asset_hub.yml \ | |
-p chopsticks_configs/laos.yml & | |
working-directory: ./e2e-tests | |
- name: Wait for chopsticks | |
run: | | |
timeout 36 sh -c 'until nc -z $0 $1; do echo -n .; sleep 1; done' localhost 9999 | |
- name: Run invalid tx tests | |
run: | | |
npm run build && npm run test-invalid-tx | |
working-directory: ./e2e-tests | |
e2e-tests: | |
needs: build | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- uses: ./.github/actions/cache | |
with: | |
cache-key: build_and_push | |
- name: Download polkadot | |
run: | | |
chmod +x ./zombienet/download_polkadot.sh | |
./zombienet/download_polkadot.sh | |
- name: Copy zombienet binary | |
run: | | |
wget https://github.com/paritytech/zombienet/releases/download/v1.3.106/zombienet-linux-x64 | |
chmod +x ./zombienet-linux-x64 | |
- name: Run zombienet | |
run: | | |
export ZOMBIENET_RELAYCHAIN_COMMAND=./tmp/polkadot | |
export ZOMBIENET_LAOS_COMMAND=./target/release/laos | |
export ZOMBIENET_ASSETHUB_COMMAND=./tmp/polkadot-parachain | |
./zombienet-linux-x64 spawn ./zombienet/native.toml & | |
echo "Zombienet started" | |
- name: Wait for zombienet | |
run: | | |
timeout 36 sh -c 'until nc -z $0 $1; do echo -n .; sleep 1; done' localhost 9999 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Run e2e tests | |
run: | | |
npm run build && npm run test | |
working-directory: ./e2e-tests |