refactoring #933
Workflow file for this run
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 | |
- name: Save LAOS binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: laos-binary | |
path: ./target/release/laos | |
- name: Save LAOS runtime | |
uses: actions/upload-artifact@v3 | |
with: | |
name: laos-runtime | |
path: ./target/release/wbuild/laos-runtime/laos_runtime.compact.compressed.wasm | |
lint: | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/cache-npm | |
with: | |
cache-key: npm | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install npm-dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Run lint | |
run: | | |
npm run fmt-check | |
working-directory: ./e2e-tests | |
zombie-tests: | |
needs: [build, lint] | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/cache-npm | |
with: | |
cache-key: npm | |
- name: Download LAOS binary | |
uses: actions/download-artifact@v3 | |
with: | |
name: laos-binary | |
path: ./target/release | |
- name: Give executable permissions to LAOS binary | |
run: | | |
chmod +x ./target/release/laos | |
- 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 | |
./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 npm-dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Npm build | |
run: | | |
npm run build | |
working-directory: ./e2e-tests | |
- name: Run evm tests | |
run: | | |
npm run test-evm | |
working-directory: ./e2e-tests | |
- name: Run contract deploy test | |
run: | | |
npm run test-deploy | |
working-directory: ./e2e-tests | |
chopsticks-tests: | |
needs: [build, lint] | |
runs-on: | |
group: laos | |
labels: ubuntu-16-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/cache-npm | |
with: | |
cache-key: npm | |
- name: Download LAOS runtime | |
uses: actions/download-artifact@v3 | |
with: | |
name: laos-runtime | |
path: ./target/release/wbuild/laos-runtime | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install npm-dependencies | |
run: | | |
npm install | |
working-directory: ./e2e-tests | |
- name: Run chopsticks | |
run: | | |
npx @acala-network/chopsticks xcm \ | |
-r polkadot \ | |
-p laos \ | |
-p chopsticks-configs/asset_hub.yml & | |
echo "Chopsticks started" | |
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 8000 | |
- name: Npm build | |
run: | | |
npm run build | |
working-directory: ./e2e-tests | |
- name: Run upgrade chain test | |
run: | | |
npm run test-upgrade-chain | |
working-directory: ./e2e-tests | |
- name: Run xcm tests | |
run: | | |
npm run test-xcm | |
working-directory: ./e2e-tests | |