Skip to content

Commit

Permalink
Integrate Moonwall (#1192)
Browse files Browse the repository at this point in the history
* modify integration tests

* wip

* correct typescript to be utilized by zndsl

* integrate moonwall

* use faster pnpm package manager

* get moonwall network running

* add scripts folder

* add moonwall readme

* update readme

* add runtime upgrade integration tests

* update readme

* wip chopticks runtime upgrade test

* prepare chopsticks battery station upgrade test

* add chopsticks and sqlite3

* chopsticks runs locally after python installation

* battery station rt-upgrade works, but not main-net

* fix zeitgeist chopsticks upgrade test

* add zndsl test to workflow

* update integration test workflow

* wip

* update download polkadot

* wip

* wip

* wip

* wip

* wip

* wip

* use artifact storage in github actions

* use release instead of debug

* update ci

* update ci

* update ci

* correct CI

* avoid creating zeitgeist folder

* download to target/release

* add executive permission

* dump chopsticks

* log chopsticks

* increase timeouts for CI workflows

* resolve ws port conflict, add xcm transfer test

* add xcm tests to ci

* fix log print for chopsticks

* use polkadot v1.1.0 for it-tests

* add xcm test to post rt upgrade suite

* correct ci

* manually increase blocks for hydradx

* divide main and test-net it tests

* avoid port conflict for parallel chopsticks jobs

* fix CI and typescript errors

* update ci

* exit cat command in ci

* update CI to stop immediately

* restructure jobs

* update CI to only show logs for failure

* update readme

* update readme

* delete outdated test instruction

* delete unused files

* add license to integration tests

* add copyright

* add copyrights

* add copyrights

* mkdir integration-tests/tmp

* update integration test readme

* Update integration-tests/scripts/download-polkadot.sh

Co-authored-by: Harald Heckmann <[email protected]>

* update gitignore

* update download polkadot comment

* build node for deploy-zombienet script

* remove mkdir

* Update integration-tests/scripts/download-polkadot.sh

Co-authored-by: Harald Heckmann <[email protected]>

* Update integration-tests/scripts/download-polkadot.sh

Co-authored-by: Harald Heckmann <[email protected]>

* Update .github/workflows/integration-tests.yml

Co-authored-by: Harald Heckmann <[email protected]>

* build node in non CI environments

* change integration test execution directory

* remove CI run for this branch

---------

Co-authored-by: Harald Heckmann <[email protected]>
  • Loading branch information
Chralt98 and sea212 authored Feb 15, 2024
1 parent 20358a9 commit f793cf3
Show file tree
Hide file tree
Showing 29 changed files with 7,898 additions and 3,784 deletions.
269 changes: 269 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
name: Integration Tests

on:
push:
tags:
- '^v[0-9]+.[0-9]+.[0-9]+(-rc[0-9]+)?$'

env:
CARGO_TERM_COLOR: always

jobs:
build_parachain:
name: Build Parachain
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- name: Build Parachain
run: cargo build --release --features parachain

- name: Save runtime wasm
run: |
mkdir -p runtimes
cp target/release/wbuild/battery-station-runtime/battery_station_runtime.compact.compressed.wasm runtimes/;
cp target/release/wbuild/zeitgeist-runtime/zeitgeist_runtime.compact.compressed.wasm runtimes/;
- name: Upload runtimes
uses: actions/[email protected]
with:
name: runtimes
path: runtimes

- name: Save zeitgeist binary
run: |
mkdir -p binaries
cp target/release/zeitgeist binaries/;
- name: Upload binary
uses: actions/[email protected]
with:
name: binaries
path: binaries

zombienet_zndsl:
name: ZNDSL Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/zeitgeist-runtime/
mkdir -p integration-tests/tmp
- name: Download runtime
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/zeitgeist-runtime/

- name: Download binary
uses: actions/[email protected]
with:
name: binaries
path: target/release

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Run ZNDSL integration tests
run: |
chmod uog+x target/release/zeitgeist
cd integration-tests
./scripts/download-polkadot.sh
./scripts/deploy-zombienet.sh --no-build --test
zombienet_zeitgeist_upgrade:
name: Zeitgeist Zombienet Post-Upgrade Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/zeitgeist-runtime/
mkdir -p integration-tests/tmp
- name: Download runtime
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/zeitgeist-runtime/

- name: Download binary
uses: actions/[email protected]
with:
name: binaries
path: target/release

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Test zeitgeist runtime upgrade using Zombienet
run: |
chmod uog+x target/release/zeitgeist
cd integration-tests
pnpm exec moonwall test zombienet_zeitgeist_upgrade
chopsticks_battery_station_upgrade:
name: Battery Station Chopsticks Post-Upgrade Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/battery-station-runtime/
mkdir -p integration-tests/tmp/node_logs
- name: Download runtime
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/battery-station-runtime/

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Battery Station post-upgrade tests using Chopsticks
run: |
cd integration-tests
pnpm exec moonwall test chopsticks_battery_station_upgrade
- name: Show chopsticks logs
if: ${{ failure() }}
run: |
cd integration-tests
ls -R tmp/node_logs/
cat tmp/node_logs/*.log | tail -n 1000
chopsticks_zeitgeist_upgrade:
name: Zeitgeist Chopsticks Post-Upgrade Tests
runs-on: ubuntu-20.04
needs: ["build_parachain"]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install build tools
run: ./scripts/init.sh

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "./integration-tests/pnpm-lock.yaml"

- name: Install pnpm packages
run: |
cd integration-tests
pnpm install
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1

- name: Create local folders
run: |
mkdir -p target/release/wbuild/zeitgeist-runtime/
mkdir -p integration-tests/tmp/node_logs
- name: "Download runtime"
uses: actions/[email protected]
with:
name: runtimes
path: target/release/wbuild/zeitgeist-runtime/

- name: Display structure of downloaded files
run: ls -R
working-directory: target/

- name: Zeitgeist post-upgrade tests using Chopsticks
run: |
cd integration-tests
pnpm exec moonwall test chopsticks_zeitgeist_upgrade
- name: Show chopsticks logs
if: ${{ failure() }}
run: |
cd integration-tests
ls -R tmp/node_logs/
cat tmp/node_logs/*.log | tail -n 1000
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,6 @@ dmypy.json
# Pyre type checker
.pyre/

/tmp
/integration-tests/tmp

/integration-tests/specs
Loading

0 comments on commit f793cf3

Please sign in to comment.