Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
8fb2913
feat: add reusable artifact download and extract action
lrubasze Jun 3, 2025
165ac05
feat: add cleanup flag to download-artifact-extract action
lrubasze Jun 3, 2025
11c2008
ci: fetch required binaries for zombienet native provider
lrubasze Jun 3, 2025
8dac00e
ci: fix syntax
lrubasze Jun 3, 2025
a2dbba8
ci: zombienet-sdk add some description
lrubasze Jun 3, 2025
5beed3e
ci: set ZOMBIE_PROVIDE=native
lrubasze Jun 3, 2025
3908728
ci: set +x permissions for downloaded binaries
lrubasze Jun 3, 2025
f742daa
ci: simplify download-artifact logic
lrubasze Jun 3, 2025
e45d1e6
ci: change runner for zombienet-sdk
lrubasze Jun 3, 2025
467f298
ci: temporarily disable non-cumulus zombienet-sdk
lrubasze Jun 3, 2025
3ef8e3e
ci: change image for zombienet-sdk
lrubasze Jun 3, 2025
22fbfc7
ci: download-artifact check befory copy
lrubasze Jun 3, 2025
7174ce8
ci: remove k8s_auth step
lrubasze Jun 3, 2025
9baef93
ci: unset RUN_IN_CI for zombienet-sdk
lrubasze Jun 3, 2025
e219b07
ci: cleanup
lrubasze Jun 3, 2025
585b3e7
ci: parity-large runner for zombienet-sdk
lrubasze Jun 3, 2025
de8e9dc
ci: zombienet-sdk handle RUN_IN_CI flag depending on provider
lrubasze Jun 3, 2025
4c2e0e0
ci: reenable zombienet test for polkadot
lrubasze Jun 3, 2025
50f48b1
ci: specify zombienet-sdk envs in separate file
lrubasze Jun 3, 2025
28258fa
ci: fix handling zombienet-sdk vars
lrubasze Jun 3, 2025
62e3bf1
ci: update and enable zombienet parachain_template
lrubasze Jun 4, 2025
e1b98dd
Merge branch 'jv-zombie-tests' into zombienet-sdk-local-provider
lrubasze Jun 4, 2025
14456c0
parachain-extrinsic-test: handle nodes with security issues
lrubasze Jun 5, 2025
cbf3db0
ci: update parachain_template to use zombienet-sdk actions
lrubasze Jun 5, 2025
32ccdb0
ci: cargo-nextest remove conflicting 'test-threads' option
lrubasze Jun 5, 2025
cafbbc6
ci: run zombienet tests with native provider
lrubasze Jun 6, 2025
5e88312
polkadot-zombienet: 0001-paritydb adjust check script for native prov…
lrubasze Jun 6, 2025
a078a73
ci: add missing inputs to zombienet action
lrubasze Jun 6, 2025
926bb59
ci: RUN_IN_CONTAINER unset and moved to zombienet.env
lrubasze Jun 6, 2025
96a299a
ci: unset ZOMBIENET_IMAGE in run-zombienet-test.sh
lrubasze Jun 6, 2025
44cb416
ci: disable some flaky polkadot zombienet tests
lrubasze Jun 7, 2025
d8c8c4a
ci: temporarily increase artifact retention days to 2
lrubasze Jun 7, 2025
7a35c4d
ci: disable approved-peer-mixed-validators polkadot zombienet test
lrubasze Jun 8, 2025
beea975
ci: align zombienet-sdk action with ci/make-zombienet-ci-great-again
lrubasze Jun 9, 2025
9caf237
ci: align zombienet_polkadot workflow with ci/make-zombienet-ci-great…
lrubasze Jun 9, 2025
0efa9ff
ci: add action to download binaries for zombienet tests
lrubasze Jun 9, 2025
9e81437
ci: allow to easily switch between zombienet native and k8s providers
lrubasze Jun 9, 2025
966b631
ci: zombienet-reusable-preflight cleanup
lrubasze Jun 9, 2025
fb55422
ci: zombient_polkadot add ZOMBIENET_PROVIDER to the env
lrubasze Jun 9, 2025
45ff86d
polkadot-zombienet: add more tolerance to elastic_scaling slot_based …
lrubasze Jun 4, 2025
08a79b2
polkadot-zombienet: add more tolerance to elastic_scaling basic_3core…
lrubasze Jun 9, 2025
0863db2
polkadot-zombienet: add more tolerance to doesnt_break_parachains_tes…
lrubasze Jun 9, 2025
9490ef6
polkadot-zombienet: add more tolerance to async_backing_6_seconds_rat…
lrubasze Jun 9, 2025
03012d3
Update .github/zombienet-sdk-env
pepoviola Jun 10, 2025
7f8f9cf
ci: update zombienet image to v1.3.129
lrubasze Jun 10, 2025
aa0594b
polkadot-zombienet: add more tolerance to sync_backing test
lrubasze Jun 10, 2025
90ecbcc
polkadot-zombienet: add more tolerance to async_backing_6_seconds_rat…
lrubasze Jun 10, 2025
ec44a44
polkadot-zombienet: 0018-shared-core-idle-parachain increase timeout
lrubasze Jun 5, 2025
ab6ab18
polkadot-zombienet: add even more tolerance to elastic_scaling slot_b…
lrubasze Jun 5, 2025
268dabf
temporarily switch to zombienet-sdk from git
lrubasze Jun 10, 2025
01b157e
move to zombienet action
pepoviola Jun 10, 2025
3342896
re-enable substrate tests
pepoviola Jun 10, 2025
f388be3
set native provider
pepoviola Jun 10, 2025
ef9d60f
add download for substrate
pepoviola Jun 11, 2025
597444a
fix substrate extract artifact
pepoviola Jun 11, 2025
7c3ae92
polkadot-zombienet: add more tolerance to async_backing_6_seconds_rat…
lrubasze Jun 12, 2025
ed69c00
Revert "temporarily switch to zombienet-sdk from git"
lrubasze Jun 13, 2025
f22d3c3
bump 'zombienet-sdk' to v0.3.6
lrubasze Jun 13, 2025
b5b0a45
ci: disable zombienet polkadot disputes tests
lrubasze Jun 13, 2025
ff1e2dd
ci: specify FLAKY_TESTS multiline-wise for more clarity
lrubasze Jun 13, 2025
0f5ffeb
ci: zombienet-reusable-preflight cleanup
lrubasze Jun 13, 2025
95a92c3
ci: add option to pick runner for test: default, large (atm all tests…
lrubasze Jun 13, 2025
5f39e4d
ci: zombienet_polkadot assign default runner for some tests
lrubasze Jun 13, 2025
f2e9d9a
ci: zombienet_substrate assign default runner for some tests
lrubasze Jun 13, 2025
c921d5d
ci: zombienet_parachain-templat assign default runner for some tests
lrubasze Jun 13, 2025
684975b
ci: zombienet_cumulus assign default runner for some tests
lrubasze Jun 13, 2025
4f21ff3
ci: fix runner configuration
lrubasze Jun 13, 2025
14e68fc
bump images
pepoviola Jun 13, 2025
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
78 changes: 78 additions & 0 deletions .github/actions/download-artifact-extract/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: "Download and extract artifact"
description: "Downloads an artifact, extracts it, and optionally copies files to a destination"

inputs:
artifact-name:
description: "Name of the artifact to download"
required: true
gh-token:
description: "GITHUB_TOKEN to use for downloading artifacts"
required: true
run-id:
description: "Run ID from which to download the artifact"
required: true
extract-path:
description: "Path where to extract the artifact"
default: "."
required: false
files-to-copy:
description: "Comma-separated (or newline-separated, remember about |) list of files to copy from the extracted artifact"
required: false
destination-path:
description: "Destination path for copied files"
required: false
cleanup:
description: "Whether to remove downloaded artifacts after copying (true/false)"
required: false
default: "false"

runs:
using: "composite"
steps:
- uses: actions/download-artifact@v4.1.8
with:
name: ${{ inputs.artifact-name }}
github-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.run-id }}
path: ${{ inputs.extract-path }}

- name: Extract artifact
shell: bash
working-directory: ${{ inputs.extract-path }}
run: |
if [[ -f artifacts.tar ]]; then
tar -xvf artifacts.tar
elif [[ -f *.tar ]]; then
tar -xvf *.tar
elif [[ -f *.tar.gz ]]; then
tar -xzvf *.tar.gz
elif [[ -f *.tgz ]]; then
tar -xzvf *.tgz
elif [[ -f *.zip ]]; then
unzip *.zip
else
echo "No archive file found to extract"
ls -la
fi

- name: Copy files if specified
if: inputs.files-to-copy != ''
shell: bash
run: |
# Create destination directory
mkdir -p "${{ inputs.destination-path }}"

echo "${{ inputs.files-to-copy }}" | tr ',' '\n' | while read -r file; do
# trim leading and trailing whitespaces
file="$(echo "$file" | xargs)"
if [[ -n "$file" ]]; then
echo "Copying $file to ${{ inputs.destination-path }}"
cp -r "${{ inputs.extract-path }}/$file" "${{ inputs.destination-path }}/"
fi
done

# Cleanup if requested
if [[ "${{ inputs.cleanup }}" == "true" ]]; then
echo "Cleaning up downloaded artifacts in ${{ inputs.extract-path }}"
rm -rf "${{ inputs.extract-path }}"
fi
104 changes: 104 additions & 0 deletions .github/actions/download-binaries-for-zombienet-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: "Download binaries for zombienet tests"
description: "Zombienet native tests expects some set of binaries to be available in the filesystem"

inputs:
build-id:
description: ""
required: true
ref-slug:
description: "Ref slug (e.g branch-name-short)"
required: true
gh-token:
description: "GITHUB_TOKEN to use for downloading artifacts"
required: true
destination-path:
description: "Destination path for copied files"
required: false

runs:
using: "composite"
steps:
- uses: ./.github/actions/download-artifact-extract
with:
artifact-name: build-linux-substrate-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}
extract-path: ./tmp
files-to-copy: |
artifacts/substrate/substrate
destination-path: ${{ inputs.destination-path }}
cleanup: "true"

- uses: ./.github/actions/download-artifact-extract
with:
artifact-name: build-linux-stable-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}
extract-path: ./tmp
files-to-copy: |
artifacts/polkadot
artifacts/polkadot-execute-worker
artifacts/polkadot-prepare-worker
destination-path: ${{ inputs.destination-path }}
cleanup: "true"


- uses: ./.github/actions/download-artifact-extract
with:
artifact-name: build-linux-stable-cumulus-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}
extract-path: ./tmp
files-to-copy: |
artifacts/polkadot-parachain
destination-path: ${{ inputs.destination-path }}
cleanup: "true"

- uses: ./.github/actions/download-artifact-extract
with:
artifact-name: build-test-parachain-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}
extract-path: ./tmp
files-to-copy: |
artifacts/test-parachain
destination-path: ${{ inputs.destination-path }}
cleanup: "true"

- uses: ./.github/actions/download-artifact-extract
with:
artifact-name: build-test-collators-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}
extract-path: ./tmp
files-to-copy: |
artifacts/adder-collator
artifacts/undying-collator
destination-path: ${{ inputs.destination-path }}
cleanup: "true"

- uses: ./.github/actions/download-artifact-extract
with:
artifact-name: build-malus-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}
extract-path: ./tmp
# TODO: should copy polkadot-execute-worker and polkadot-prepare-worker?
# if yes then it overlaps with build-linux-stable - address this
files-to-copy: |
artifacts/malus
destination-path: ${{ inputs.destination-path }}
cleanup: "true"

- uses: ./.github/actions/download-artifact-extract
with:
artifact-name: build-templates-node-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}
extract-path: ./tmp
files-to-copy: |
artifacts/minimal-template-node
artifacts/parachain-template-node
artifacts/solochain-template-node
destination-path: ${{ inputs.destination-path }}
cleanup: "true"
54 changes: 36 additions & 18 deletions .github/actions/zombienet-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: "Zombienet-sdk test"
description: "Runs zombienet-sdk tests with archived artifacts"
inputs:
build-id:
description: ""
required: true
ref-slug:
description:
description: "Ref slug (e.g branch-name-short)"
required: true
test:
description: "test filter to pass to nextest (e.g: functional::spam_statement_distribution_requests::spam_statement_distribution_requests_test)"
Expand All @@ -21,12 +22,6 @@ inputs:
runs:
using: "composite"
steps:
- name: k8s_auth
shell: bash
run: |
. /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
k8s_auth

- name: common_vars
shell: bash
env:
Expand All @@ -40,35 +35,58 @@ runs:
echo "CUMULUS_IMAGE: $CUMULUS_IMAGE"
echo "COL_IMAGE: $COL_IMAGE"
echo "MALUS_IMAGE: $MALUS_IMAGE"
echo "RUN_IN_CI: $RUN_IN_CI"
echo "Inputs"
echo "test: $TEST_NAME"
echo "prefix: $PREFIX"

- uses: actions/download-artifact@v4.1.8
- name: Download binaries for zombienet native tests
if: env.ZOMBIE_PROVIDER == 'native'
uses: ./.github/actions/download-binaries-for-zombienet-tests
with:
gh-token: ${{ inputs.gh-token }}
ref-slug: ${{ inputs.ref-slug }}
build-id: ${{ inputs.build-id }}
destination-path: ./bin

- uses: ./.github/actions/download-artifact-extract
with:
name: prepare-${{ inputs.prefix }}-zombienet-artifacts-${{ inputs.ref-slug }}
github-token: ${{ inputs.gh-token }}
artifact-name: prepare-${{ inputs.prefix }}-zombienet-artifacts-${{ inputs.ref-slug }}
gh-token: ${{ inputs.gh-token }}
run-id: ${{ inputs.build-id }}

- name: tar
- name: k8s_auth
if: env.ZOMBIE_PROVIDER == 'k8s'
shell: bash
run: tar -xvf artifacts.tar
run: |
. /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
k8s_auth

- name: zombie_test
shell: bash
env:
# zombienet-sdk expects RUN_IN_CI to be set when running in CI
RUN_IN_CI: 1
# don't retry sdk tests
NEXTEST_RETRIES: 0
TEST_NAME: ${{ inputs.test }}
PREFIX: ${{ inputs.prefix }}
run: |
if [[ $ZOMBIENET_RUNNER == "parity-zombienet" ]]; then
export ZOMBIE_K8S_CI_NAMESPACE=$(cat /data/namespace)
fi;
# RUN_IN_CI=1 shall be set only for k8s provider
if [[ "$ZOMBIE_PROVIDER" == "native" ]]; then
export RUN_IN_CI=0
# set path to downloaded binaries
export PATH=$(pwd)/bin:$PATH
chmod +x $(pwd)/bin/*
else
export RUN_IN_CI=1
# no need to check other runner variables. for k8s they shall store the same value
if [[ $ZOMBIENET_SDK_DEFAULT_RUNNER == "parity-zombienet" ]]; then
export ZOMBIE_K8S_CI_NAMESPACE=$(cat /data/namespace)
fi
fi

ls -ltr ./artifacts
# We want to run tests sequentially, '--no-capture' ensures that.
# If we want to get rid of '--no-capture' some day, please use '--test-threads 1' or NEXTEST_TEST_THREADS=1
# Both options cannot coexist for cargo-nextest below v0.9.94
cargo nextest run --archive-file ./artifacts/${PREFIX}-zombienet-tests.tar.zst --no-capture -- ${TEST_NAME}

- name: process_logs
Expand Down
60 changes: 47 additions & 13 deletions .github/actions/zombienet/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "Zombienet test v1"
description: "Runs zombienet tests"
inputs:
test:
description: "test definition (zndsl file)"
Expand All @@ -10,16 +11,19 @@ inputs:
description: "Concurrency to spawn nodes"
default: 4
required: false
build-id:
description: ""
required: true
ref-slug:
description: "Ref slug (e.g branch-name-short)"
required: true
gh-token:
description: "GITHUB_TOKEN to use for downloading artifacts"
required: true

runs:
using: "composite"
steps:
- name: k8s_auth
shell: bash
run: |
. /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
k8s_auth

- name: common_vars
shell: bash
env:
Expand All @@ -29,26 +33,56 @@ runs:
run: |
echo "Vars"
echo "ZOMBIENET_INTEGRATION_TEST_IMAGE: $ZOMBIENET_INTEGRATION_TEST_IMAGE"
echo "ZOMBIENET_PROVIDER: $ZOMBIENET_PROVIDER"
echo "COL_IMAGE: $COL_IMAGE"
echo "Inputs"
echo "test: $TEST_NAME"
echo "local-dir: $LOCAL_PATH"
echo "concurrency: $CONCURRENCY"

- name: Download binaries for zombienet native tests
if: env.ZOMBIENET_PROVIDER == 'native'
uses: ./.github/actions/download-binaries-for-zombienet-tests
with:
gh-token: ${{ inputs.gh-token }}
ref-slug: ${{ inputs.ref-slug }}
build-id: ${{ inputs.build-id }}
destination-path: ./bin

- name: k8s_auth
if: env.ZOMBIENET_PROVIDER == 'k8s'
shell: bash
run: |
. /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
k8s_auth

- name: zombie_test
shell: bash
env:
TEST_NAME: ${{ inputs.test }}
LOCAL_PATH: ${{ inputs.local-dir }}
CONCURRENCY: ${{ inputs.concurrency }}
run: |
if [[ $ZOMBIENET_RUNNER == "parity-zombienet" ]]; then
export ZOMBIE_NAMESPACE=$(cat /data/namespace)
fi;
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \
--local-dir="$(pwd)/$LOCAL_PATH" \
--concurrency=$CONCURRENCY \
--test="$TEST_NAME"
if [[ "$ZOMBIENET_PROVIDER" == "native" ]]; then
# set path to downloaded binaries
export PATH=$(pwd)/bin:$PATH
chmod +x $(pwd)/bin/*

./.github/scripts/run-zombienet-test.sh \
"$(pwd)/$LOCAL_PATH" \
$CONCURRENCY \
"$TEST_NAME"
else
# no need to check other runner variables. for k8s they shall store the same value
if [[ $ZOMBIENET_DEFAULT_RUNNER == "parity-zombienet" ]]; then
export ZOMBIE_NAMESPACE=$(cat /data/namespace)
fi

/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \
--local-dir="$(pwd)/$LOCAL_PATH" \
--concurrency=$CONCURRENCY \
--test="$TEST_NAME"
fi

- name: upload_logs
uses: actions/upload-artifact@v4
Expand Down
Loading
Loading