Files
pezkuwi-sdk/.github/actions/zombienet/action.yml
T
pezkuwichain ee389beb8c feat: Add rebrand CI/CD workflows to main branch
- Add 72 rebrand workflow files (polkadot→pezkuwi, substrate→bizinikiwi, cumulus→pezcumulus)
- Add GitHub actions, issue templates, and configs
- Removed unnecessary workflows (fork-sync, gitspiegel, upstream-tracker, sync-templates, backport)
- Renamed zombienet test files to match new naming convention
2025-12-19 22:51:57 +03:00

105 lines
4.0 KiB
YAML

name: "Zombienet test v1"
description: "Runs zombienet tests"
inputs:
test-definition:
description: "test definition (zndsl file)"
required: true
job-name:
description: "Job name to use for artifact uploading"
required: true
local-dir:
description: "Path to the directory tha contains the test file (.zndsl)"
required: true
concurrency:
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: common_vars
shell: bash
env:
TEST_DEFINITION: ${{ inputs.test-definition }}
LOCAL_PATH: ${{ inputs.local-dir }}
CONCURRENCY: ${{ inputs.concurrency }}
run: |
echo "::group::Test Configuration"
echo "══════════════════════════════════════════════════════════════════"
echo "Environment Variables:"
echo " ZOMBIENET_INTEGRATION_TEST_IMAGE: $ZOMBIENET_INTEGRATION_TEST_IMAGE"
echo " ZOMBIENET_PROVIDER: $ZOMBIENET_PROVIDER"
echo " COL_IMAGE: $COL_IMAGE"
echo ""
echo "Test Parameters:"
echo " Test Definition: $TEST_DEFINITION"
echo " Job Name: ${{ inputs.job-name }}"
echo " Local Directory: $LOCAL_PATH"
echo " Concurrency: $CONCURRENCY"
echo ""
# Show flaky tests information if any are disabled
if [[ -f .github/zombienet-flaky-tests ]]; then
FLAKY_COUNT=$(grep -v '^#' .github/zombienet-flaky-tests | grep -v '^$' | wc -l | tr -d ' ')
if [[ $FLAKY_COUNT -gt 0 ]]; then
echo "⚠️ Flaky/Disabled Tests: $FLAKY_COUNT test(s) currently disabled"
echo "📄 See: https://github.com/pezkuwichain/pezkuwi-sdk/blob/${{ github.sha }}/.github/zombienet-flaky-tests"
echo "📖 Docs: https://github.com/pezkuwichain/pezkuwi-sdk/blob/${{ github.sha }}/.github/ZOMBIENET_FLAKY_TESTS.md"
fi
fi
echo "════════════════════════════════════════════════════════════════"
echo "::endgroup::"
- 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_DEFINITION: ${{ inputs.test-definition }}
LOCAL_PATH: ${{ inputs.local-dir }}
CONCURRENCY: ${{ inputs.concurrency }}
run: |
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_DEFINITION"
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_K8S_CI_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_DEFINITION"
fi