Skip to content

Post crates release activities for stable2509 #14985

Post crates release activities for stable2509

Post crates release activities for stable2509 #14985

name: Zombienet Polkadot
on:
workflow_dispatch:
inputs:
test_pattern:
type: string
description: "Run tests which names match this pattern (also flaky)"
default: ""
required: false
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: read-all
env:
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
LOCAL_DIR: "./polkadot/zombienet_tests"
GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443"
# use spot by default
X_INFRA_INSTANCE: "spot"
# don't retry sdk tests
NEXTEST_RETRIES: 0
KUBECONFIG: "/data/config"
ZOMBIE_CLEANER_DISABLED: 1
# only run if we have changes in [subtrate, polkadot] directories or this workflow.
jobs:
isdraft:
uses: ./.github/workflows/reusable-isdraft.yml
preflight:
needs: isdraft
uses: ./.github/workflows/zombienet-reusable-preflight.yml
with:
tests_yaml: .github/zombienet-tests/zombienet_polkadot_tests.yml
test_pattern: ${{ inputs.test_pattern }}
zombienet-polkadot-tests:
name: ${{ matrix.test.job-name }}
runs-on: ${{ matrix.test.runner-type == 'large' && (matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_LARGE_RUNNER) || (matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER || needs.preflight.outputs.ZOMBIENET_DEFAULT_RUNNER) }}
timeout-minutes: 60
needs: [preflight]
if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_polkadot) }}
container:
image: ${{ matrix.test.use-zombienet-sdk && needs.preflight.outputs.ZOMBIENET_SDK_IMAGE || needs.preflight.outputs.ZOMBIENET_IMAGE }}
options: -v /tmp/zombienet:/tmp/zombienet
env:
ZOMBIENET_INTEGRATION_TEST_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
POLKADOT_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/colander:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.test.cumulus-image || 'polkadot-parachain-debug' }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
MALUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/malus:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}"
DEBUG: ${{ needs.preflight.outputs.DEBUG }}
ZOMBIENET_PROVIDER: ${{ needs.preflight.outputs.ZOMBIENET_PROVIDER }}
RUST_LOG: ${{ needs.preflight.outputs.RUST_LOG }}
ZOMBIE_PROVIDER: ${{ needs.preflight.outputs.ZOMBIE_PROVIDER }}
strategy:
fail-fast: false
matrix:
test: ${{ fromJson(needs.preflight.outputs.TEST_MATRIX) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set additional environment variables
if: ${{ matrix.test.additional-env }}
shell: bash
run: |
echo '${{ toJson(matrix.test.additional-env) }}' | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> $GITHUB_ENV
- name: Additional setup
if: ${{ matrix.test.additional-setup }}
shell: bash
run: ${{ matrix.test.additional-setup }}
- name: zombienet_test (v1)
if: ${{ !matrix.test.use-zombienet-sdk }}
uses: ./.github/actions/zombienet
with:
test-definition: ${{ matrix.test.test-definition }}
job-name: ${{ matrix.test.job-name }}
local-dir: ${{ matrix.test.local-dir }}
concurrency: ${{ matrix.test.concurrency || 1 }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
build-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}
ref-slug: ${{ needs.preflight.outputs.SOURCE_REF_SLUG }}
- name: zombienet_test (sdk)
if: ${{ matrix.test.use-zombienet-sdk }}
uses: ./.github/actions/zombienet-sdk
with:
test-filter: ${{ matrix.test.test-filter }}
job-name: ${{ matrix.test.job-name }}
prefix: "polkadot"
gh-token: ${{ secrets.GITHUB_TOKEN }}
build-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }}
ref-slug: ${{ needs.preflight.outputs.SOURCE_REF_SLUG }}