Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow manual running of all zombienet tests in CI #636

Merged
merged 33 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6096d06
Add zombie_flashbox moonwall suite, not enabled in CI
tmpolaczyk Jul 24, 2024
3f71ecd
Allow manual running of all zombienet tests in ci
tmpolaczyk Jul 24, 2024
0d0d98b
Test workflow by running in this branch
tmpolaczyk Jul 24, 2024
a2a751f
Try again
tmpolaczyk Jul 24, 2024
48ea403
Fix regex
tmpolaczyk Jul 24, 2024
1dca77b
Try fix
tmpolaczyk Jul 24, 2024
62e7834
syntax
tmpolaczyk Jul 24, 2024
086c6eb
Fix
tmpolaczyk Jul 24, 2024
e207c14
Maybe fix
tmpolaczyk Jul 24, 2024
c4a3daa
Refactor all zombienet actions
tmpolaczyk Jul 24, 2024
e965037
fix
tmpolaczyk Jul 24, 2024
c9a066e
github output
tmpolaczyk Jul 24, 2024
bc2002b
Fix workflow add missing checkout
tmpolaczyk Jul 30, 2024
b2866de
Merge remote-tracking branch 'origin/master' into tomasz-zombie-manua…
tmpolaczyk Jul 30, 2024
ca7a1da
Fix chmod tanssi-relay
tmpolaczyk Jul 30, 2024
b346ee0
Fix use of workflow template
tmpolaczyk Jul 30, 2024
f6d9a7a
shell: bash
tmpolaczyk Jul 30, 2024
6e82220
Merge remote-tracking branch 'origin/master' into tomasz-zombie-manua…
tmpolaczyk Jul 30, 2024
3a2a79b
Change JSON format to matrix compatible one
tmpolaczyk Jul 30, 2024
b930814
JSON errors
tmpolaczyk Jul 30, 2024
c0f4807
Fix JSON?
tmpolaczyk Jul 30, 2024
abfa8fb
Escape JSON?
tmpolaczyk Jul 30, 2024
9214b3c
please
tmpolaczyk Jul 30, 2024
b58355d
Revert "please"
tmpolaczyk Jul 30, 2024
892f840
Revert "Escape JSON?"
tmpolaczyk Jul 30, 2024
ced29af
Maybe this?
tmpolaczyk Jul 30, 2024
9c0ea6a
Remove debugging stuff
tmpolaczyk Jul 30, 2024
f9b0b95
Fix matrix key
tmpolaczyk Jul 30, 2024
f13cb43
Exclude upgrade tests
tmpolaczyk Jul 30, 2024
1b6b854
Fix wasm precompile for flashbox
tmpolaczyk Jul 30, 2024
00bf5c5
Update .github/workflows/run-zombienet-tests.yml
tmpolaczyk Jul 31, 2024
b996f6b
Add fail-fast: false to matrix jobs
tmpolaczyk Jul 31, 2024
3845e92
Merge remote-tracking branch 'origin/master' into tomasz-zombie-manua…
tmpolaczyk Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflow-templates/zombienet-tests/action.yml
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
283 changes: 11 additions & 272 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -552,222 +552,18 @@ jobs:
zombienet-tests:
runs-on: self-hosted
needs: ["set-tags", "build"]
strategy:
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:
Expand Down Expand Up @@ -937,63 +733,6 @@ 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"]
Expand Down
Loading
Loading