From 60c05a65661b06c4c8567e1f639279cedf0e2fa9 Mon Sep 17 00:00:00 2001 From: rzadp Date: Tue, 13 Aug 2024 12:58:54 +0200 Subject: [PATCH] Test on CI --- .github/tests/zombienet-smoke-test.zndsl | 9 +++++ .github/workflows/test-zombienet.yml | 50 ++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/tests/zombienet-smoke-test.zndsl create mode 100644 .github/workflows/test-zombienet.yml diff --git a/.github/tests/zombienet-smoke-test.zndsl b/.github/tests/zombienet-smoke-test.zndsl new file mode 100644 index 0000000..fcb4a13 --- /dev/null +++ b/.github/tests/zombienet-smoke-test.zndsl @@ -0,0 +1,9 @@ +Description: Simple Network Smoke Test +Network: ../../zombienet.toml +Creds: config + +alice: is up +bob: is up +charlie: is up +alice: parachain 1000 is registered within 225 seconds +alice: parachain 1000 block height is at least 10 within 200 seconds diff --git a/.github/workflows/test-zombienet.yml b/.github/workflows/test-zombienet.yml new file mode 100644 index 0000000..929b753 --- /dev/null +++ b/.github/workflows/test-zombienet.yml @@ -0,0 +1,50 @@ +name: Test Zombienet setup + +on: + pull_request: + push: + branches: + - main + - master + - rzadp/ci-test-zombienet + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-zombienet: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + env: + POLKADOT_VERSION: v1.15.0 + steps: + - uses: actions/checkout@v4 + + - if: contains(matrix.os, 'ubuntu') + uses: ./.github/actions/free-disk-space + - if: contains(matrix.os, 'ubuntu') + uses: ./.github/actions/ubuntu-dependencies + - if: contains(matrix.os, 'macos') + uses: ./.github/actions/macos-dependencies + + - name: Build the node individually in release mode + run: cargo build --package parachain-template-node --release + timeout-minutes: 90 + + - name: Download relaychain binaries + run: | + wget --no-verbose https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-${{ env.POLKADOT_VERSION }}/polkadot + wget --no-verbose https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-${{ env.POLKADOT_VERSION }}/polkadot-prepare-worker + wget --no-verbose https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-${{ env.POLKADOT_VERSION }}/polkadot-execute-worker + chmod +x ./polkadot* + working-directory: ./target/release + + - name: Run zombienet tests + run: | + export PATH="./target/release:$PATH" + npx --yes @zombienet/cli --provider native test .github/tests/zombienet-smoke-test.zndsl + shell: bash + timeout-minutes: 10