diff --git a/.github/ZOMBIENET_FLAKY_TESTS.md b/.github/ZOMBIENET_FLAKY_TESTS.md index 12c4cceec4bfe..38c274993de03 100644 --- a/.github/ZOMBIENET_FLAKY_TESTS.md +++ b/.github/ZOMBIENET_FLAKY_TESTS.md @@ -61,4 +61,4 @@ Once a flaky test has been fixed: - The number of currently disabled tests is displayed in the CI logs during zombienet test runs - You can view the current list at: [`.github/zombienet-flaky-tests`](./zombienet-flaky-tests) -- Each disabled test should have an associated GitHub issue for tracking +- Each disabled test should have an associated GitHub issue for tracking \ No newline at end of file diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index 70b78dfbf1893..f58d36d476b4e 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -23,6 +23,14 @@ on: test_pattern: required: false type: string + build_run_id: + required: false + type: string + description: "Build run ID from the build workflow (when called from build workflow)" + ref_slug: + required: false + type: string + description: "Source ref slug from the build workflow (when called from build workflow)" # Map the workflow outputs to job outputs outputs: changes_substrate: @@ -150,14 +158,16 @@ jobs: # preflight: runs-on: ubuntu-latest - if: github.event_name == 'workflow_dispatch' || ! contains(github.event.pull_request.labels.*.name, 'T19-skip-zombienet_tests') + # Run if: workflow_call (from build) OR workflow_dispatch OR (PR without skip label) + if: github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || ! contains(github.event.pull_request.labels.*.name, 'T19-skip-zombienet_tests') outputs: - changes_substrate: ${{ steps.set_changes.outputs.substrate_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} - changes_cumulus: ${{ steps.set_changes.outputs.cumulus_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} - changes_polkadot: ${{ steps.set_changes.outputs.polkadot_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} - changes_bridges: ${{ steps.set_changes.outputs.bridges_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} - changes_templates: ${{ steps.set_changes.outputs.templates_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }} + changes_substrate: ${{ steps.set_changes.outputs.substrate_any_changed }} + changes_cumulus: ${{ steps.set_changes.outputs.cumulus_any_changed }} + changes_polkadot: ${{ steps.set_changes.outputs.polkadot_any_changed }} + changes_bridges: ${{ steps.set_changes.outputs.bridges_any_changed }} + changes_templates: ${{ steps.set_changes.outputs.templates_any_changed }} + changes_workflow: ${{ steps.set_changes.outputs.currentWorkflow_any_changed }} CI_IMAGE: ${{ steps.set_vars.outputs.IMAGE }} diff --git a/.github/workflows/zombienet_cumulus.yml b/.github/workflows/zombienet_cumulus.yml index efd2616d707b7..1c6820365f128 100644 --- a/.github/workflows/zombienet_cumulus.yml +++ b/.github/workflows/zombienet_cumulus.yml @@ -41,6 +41,8 @@ jobs: with: tests_yaml: .github/zombienet-tests/zombienet_cumulus_tests.yml test_pattern: ${{ inputs.test_pattern }} + build_run_id: ${{ inputs.build_run_id }} + ref_slug: ${{ inputs.ref_slug }} zombienet-cumulus-tests: @@ -48,7 +50,8 @@ jobs: runs-on: ${{ matrix.test.runner-type == 'large' && needs.preflight.outputs.ZOMBIENET_SDK_LARGE_RUNNER || needs.preflight.outputs.ZOMBIENET_SDK_DEFAULT_RUNNER }} timeout-minutes: 70 # 60 for test + 10 for send logs needs: [preflight] - if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot) }} + # Run if: called from build workflow OR (manual trigger AND relevant changes detected) + if: ${{ github.event_name == 'workflow_call' || (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot) }} container: image: ${{ needs.preflight.outputs.ZOMBIENET_SDK_IMAGE }} options: -v /tmp/zombienet:/tmp/zombienet diff --git a/.github/workflows/zombienet_parachain-template.yml b/.github/workflows/zombienet_parachain-template.yml index 8c8217b6a349c..acb5054abce57 100644 --- a/.github/workflows/zombienet_parachain-template.yml +++ b/.github/workflows/zombienet_parachain-template.yml @@ -36,6 +36,8 @@ jobs: with: tests_yaml: .github/zombienet-tests/zombienet_parachain-template_tests.yml test_pattern: ${{ inputs.test_pattern }} + build_run_id: ${{ inputs.build_run_id }} + ref_slug: ${{ inputs.ref_slug }} zombienet-parachain-template-tests: @@ -43,7 +45,8 @@ jobs: 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] - if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot) }} + # Run if: called from build workflow OR (manual trigger AND relevant changes detected) + if: ${{ github.event_name == 'workflow_call' || (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot) }} container: image: ${{ needs.preflight.outputs.ZOMBIENET_SDK_IMAGE }} options: -v /tmp/zombienet:/tmp/zombienet diff --git a/.github/workflows/zombienet_polkadot.yml b/.github/workflows/zombienet_polkadot.yml index 27bb39f38f9a5..1d4ba562e4cd0 100644 --- a/.github/workflows/zombienet_polkadot.yml +++ b/.github/workflows/zombienet_polkadot.yml @@ -41,13 +41,16 @@ jobs: with: tests_yaml: .github/zombienet-tests/zombienet_polkadot_tests.yml test_pattern: ${{ inputs.test_pattern }} + build_run_id: ${{ inputs.build_run_id }} + ref_slug: ${{ inputs.ref_slug }} 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: 70 # 60 for test + 10 for send logs needs: [preflight] - if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_polkadot) }} + # Run if: called from build workflow OR (manual trigger AND relevant changes detected) + if: ${{ github.event_name == 'workflow_call' || (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 diff --git a/.github/workflows/zombienet_substrate.yml b/.github/workflows/zombienet_substrate.yml index ff8c9353dc144..bb784df50d480 100644 --- a/.github/workflows/zombienet_substrate.yml +++ b/.github/workflows/zombienet_substrate.yml @@ -45,13 +45,16 @@ jobs: with: tests_yaml: .github/zombienet-tests/zombienet_substrate_tests.yml test_pattern: ${{ inputs.test_pattern }} + build_run_id: ${{ inputs.build_run_id }} + ref_slug: ${{ inputs.ref_slug }} zombienet-substrate-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: 70 # 60 for test + 10 for send logs needs: [preflight] - if: ${{ (needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_polkadot) }} + # Run if: called from build workflow OR (manual trigger AND relevant changes detected) + if: ${{ github.event_name == 'workflow_call' || (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