-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow manual running of all zombienet tests in CI (#636)
- Loading branch information
1 parent
7d2caa7
commit dfb7b16
Showing
4 changed files
with
222 additions
and
273 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Zombienet Tests | ||
description: | | ||
Downloads tanssi binaries compiled in previous step, and executes zombienet test suite using moonwall. | ||
Uploads zombienet logs as an artifact in case of failure. | ||
inputs: | ||
test_name: | ||
description: Zombienet suite to run | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
|
||
- name: "Download binaries" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: binaries | ||
path: target/release | ||
|
||
- name: "Run zombie test" | ||
shell: bash | ||
run: | | ||
chmod uog+x target/release/tanssi-node | ||
chmod uog+x target/release/tanssi-relay | ||
chmod uog+x target/release/tanssi-relay-prepare-worker | ||
chmod uog+x target/release/tanssi-relay-execute-worker | ||
chmod uog+x target/release/container-chain-simple-node | ||
chmod uog+x target/release/container-chain-frontier-node | ||
cd test | ||
pnpm install | ||
## Run tests | ||
pnpm moonwall test ${{ inputs.test_name }} | ||
- name: "Gather zombie logs" | ||
if: failure() | ||
shell: bash | ||
run: | | ||
ls -ltr /tmp | ||
latest_zombie_dir=$(find /tmp -type d -iname "*zombie*" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ") | ||
logs_dir="logs" | ||
mkdir -p "$logs_dir" | ||
find "$latest_zombie_dir" -type f -name "*.log" -exec cp {} "$logs_dir" \; | ||
- name: "Upload zombie logs" | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs-${{ inputs.test_name }} | ||
path: logs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -552,228 +552,26 @@ jobs: | |
zombienet-tests: | ||
runs-on: self-hosted | ||
needs: ["set-tags", "build"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test_name: [zombie_tanssi, zombie_tanssi_parathreads, zombie_tanssi_rotation, zombie_tanssi_warp_sync, zombie_tanssi_relay] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.set-tags.outputs.git_ref }} | ||
|
||
- name: Pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
|
||
- name: "Download binaries" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: binaries | ||
path: target/release | ||
|
||
- name: "Run zombie test" | ||
run: | | ||
chmod uog+x target/release/tanssi-node | ||
chmod uog+x target/release/container-chain-simple-node | ||
chmod uog+x target/release/container-chain-frontier-node | ||
cd test | ||
pnpm install | ||
## Run tests | ||
pnpm moonwall test zombie_tanssi | ||
- name: "Gather zombie logs" | ||
if: failure() | ||
run: | | ||
ls -ltr /tmp | ||
latest_zombie_dir=$(find /tmp -type d -iname "*zombie*" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ") | ||
logs_dir="logs" | ||
mkdir -p "$logs_dir" | ||
find "$latest_zombie_dir" -type f -name "*.log" -exec cp {} "$logs_dir" \; | ||
- name: "Upload zombie logs" | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs | ||
path: logs | ||
|
||
zombienet-tests-parathreads: | ||
runs-on: ubuntu-latest | ||
needs: ["set-tags", "build"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.set-tags.outputs.git_ref }} | ||
|
||
- name: Pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
|
||
- name: "Download binaries" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: binaries | ||
path: target/release | ||
|
||
- name: "Run zombie test" | ||
run: | | ||
chmod uog+x target/release/tanssi-node | ||
chmod uog+x target/release/container-chain-simple-node | ||
chmod uog+x target/release/container-chain-frontier-node | ||
cd test | ||
pnpm install | ||
## Run tests | ||
pnpm moonwall test zombie_tanssi_parathreads | ||
- name: "Gather zombie logs" | ||
if: failure() | ||
run: | | ||
ls -ltr /tmp | ||
latest_zombie_dir=$(find /tmp -type d -iname "*zombie*" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ") | ||
logs_dir="logs" | ||
mkdir -p "$logs_dir" | ||
find "$latest_zombie_dir" -type f -name "*.log" -exec cp {} "$logs_dir" \; | ||
- name: "Upload zombie logs" | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs-parathreads | ||
path: logs | ||
|
||
zombienet-tests-rotation: | ||
runs-on: self-hosted | ||
needs: ["set-tags", "build"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.set-tags.outputs.git_ref }} | ||
|
||
- name: Pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
|
||
- name: "Download binaries" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: binaries | ||
path: target/release | ||
|
||
- name: "Run zombie test" | ||
run: | | ||
chmod uog+x target/release/tanssi-node | ||
chmod uog+x target/release/container-chain-simple-node | ||
chmod uog+x target/release/container-chain-frontier-node | ||
cd test | ||
pnpm install | ||
## Run tests | ||
pnpm moonwall test zombie_tanssi_rotation | ||
- name: "Gather zombie logs" | ||
if: failure() | ||
run: | | ||
ls -ltr /tmp | ||
latest_zombie_dir=$(find /tmp -type d -iname "*zombie*" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ") | ||
logs_dir="logs" | ||
mkdir -p "$logs_dir" | ||
find "$latest_zombie_dir" -type f -name "*.log" -exec cp {} "$logs_dir" \; | ||
- name: "Upload zombie logs" | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs-rotation | ||
path: logs | ||
|
||
zombienet-tests-warp-sync: | ||
runs-on: ubuntu-latest | ||
needs: ["set-tags", "build"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.set-tags.outputs.git_ref }} | ||
|
||
- name: Pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
|
||
- name: "Download binaries" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: binaries | ||
path: target/release | ||
|
||
- name: "Run zombie test" | ||
run: | | ||
chmod uog+x target/release/tanssi-node | ||
chmod uog+x target/release/container-chain-simple-node | ||
chmod uog+x target/release/container-chain-frontier-node | ||
cd test | ||
pnpm install | ||
## Run tests | ||
pnpm moonwall test zombie_tanssi_warp_sync | ||
- name: "Gather zombie logs" | ||
if: failure() | ||
run: | | ||
ls -ltr /tmp | ||
latest_zombie_dir=$(find /tmp -type d -iname "*zombie*" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ") | ||
logs_dir="logs" | ||
mkdir -p "$logs_dir" | ||
find "$latest_zombie_dir" -type f -name "*.log" -exec cp {} "$logs_dir" \; | ||
- name: "Upload zombie logs" | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs-warp-sync | ||
path: logs | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.set-tags.outputs.git_ref }} | ||
- name: Run Zombienet Test ${{ matrix.test_name }} | ||
uses: ./.github/workflow-templates/zombienet-tests | ||
with: | ||
test_name: ${{ matrix.test_name }} | ||
|
||
chopsticks-upgrade-test: | ||
runs-on: | ||
labels: ubuntu-latest | ||
needs: ["set-tags", "build"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
chains: [ | ||
{ chain: "stagenet_dancebox", runtime: "dancebox" }, | ||
|
@@ -815,6 +613,7 @@ jobs: | |
runs-on: self-hosted | ||
needs: ["set-tags", "build"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
chain: ["dancebox"] | ||
steps: | ||
|
@@ -894,6 +693,7 @@ jobs: | |
runs-on: self-hosted | ||
needs: ["set-tags", "build"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
chains: [ | ||
{ chain: "frontier_template", runtime: "container-chain-template-frontier" }, | ||
|
@@ -937,67 +737,11 @@ jobs: | |
pnpm install | ||
pnpm moonwall test zombie_${{ matrix.chains.chain }}_upgrade | ||
zombienet-tests-tanssi-relay: | ||
runs-on: self-hosted | ||
needs: ["set-tags", "build"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.set-tags.outputs.git_ref }} | ||
|
||
- name: Pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
|
||
- name: "Download binaries" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: binaries | ||
path: target/release | ||
|
||
- name: "Run zombie test" | ||
run: | | ||
chmod uog+x target/release/tanssi-node | ||
chmod uog+x target/release/tanssi-relay | ||
chmod uog+x target/release/tanssi-relay-execute-worker | ||
chmod uog+x target/release/tanssi-relay-prepare-worker | ||
chmod uog+x target/release/container-chain-simple-node | ||
cd test | ||
pnpm install | ||
## Run tests | ||
pnpm moonwall test zombie_tanssi_relay | ||
- name: "Gather zombie logs" | ||
if: failure() | ||
run: | | ||
ls -ltr /tmp | ||
latest_zombie_dir=$(find /tmp -type d -iname "*zombie*" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ") | ||
logs_dir="logs" | ||
mkdir -p "$logs_dir" | ||
find "$latest_zombie_dir" -type f -name "*.log" -exec cp {} "$logs_dir" \; | ||
- name: "Upload zombie logs" | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs-tanssi-relay | ||
path: logs | ||
|
||
docker-tanssi: | ||
runs-on: ubuntu-latest | ||
needs: ["set-tags", "build"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: ["tanssi", "container-chain-simple-template", "container-chain-evm-template"] | ||
if: ${{ (needs.set-tags.outputs.image_exists == 'false') && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') }} | ||
|
Oops, something went wrong.