name: Zombienet Teyrchain Templates on: workflow_call: inputs: build_run_id: type: string description: "Build run ID from the build workflow." required: true ref_slug: type: string description: "Source ref slug from the build workflow." required: false test_pattern: type: string description: "Run tests which names match this pattern (also flaky)" default: "" required: false workflow_dispatch: inputs: test_pattern: type: string description: "Run tests which names match this pattern (also flaky)" default: "" required: false concurrency: group: teyrchain-template-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.run_id }} cancel-in-progress: true permissions: read-all env: FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1 GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443" # use spot by default X_INFRA_INSTANCE: "spot" # only run if we have changes in [bizinikiwi, pezkuwi] 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_teyrchain-template_tests.yml test_pattern: ${{ inputs.test_pattern }} build_run_id: ${{ inputs.build_run_id }} ref_slug: ${{ inputs.ref_slug }} zombienet-teyrchain-template-tests: name: ${{ matrix.test.job-name }} runs-on: ${{ matrix.test.runner-type == 'large' && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER }} timeout-minutes: 40 # 30 for test + 10 for send logs needs: [preflight] # Run if: called from build workflow OR merge_group OR (changes detected) if: ${{ github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group' || (needs.preflight.outputs.changes_bizinikiwi == 'true' || needs.preflight.outputs.changes_pezcumulus == 'true' || needs.preflight.outputs.changes_pezkuwi == 'true' || needs.preflight.outputs.changes_zombienet == 'true') }} container: image: ${{ needs.preflight.outputs.ZOMBIENET_SDK_IMAGE }} options: -v /tmp/zombienet:/tmp/zombienet env: PEZKUWI_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/pezkuwi-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" CUMULUS_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/${{ matrix.test.pezcumulus-image }}:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: zombienet_test timeout-minutes: 30 uses: ./.github/actions/zombienet-sdk with: test-filter: ${{ matrix.test.test-filter }} job-name: ${{ matrix.test.job-name }} prefix: "teyrchain-templates" gh-token: ${{ secrets.GITHUB_TOKEN }} build-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }} ref-slug: ${{ needs.preflight.outputs.SOURCE_REF_SLUG }} - name: process_logs if: ${{ always() }} shell: bash run: | echo "Processing log files" echo "::group::Logs" # do not fail the whole run if this step fails if ! ./.github/scripts/process-logs-zombienet.sh ; then echo "::endgroup::" echo "::warning ::WARNING: Failed to process logs" else echo "::endgroup::" fi - name: upload_logs uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 if: ${{ always() }} with: name: zombienet-logs-${{ matrix.test.job-name }}-${{ github.sha }} path: | /tmp/zombie*/logs/*