From 776ddff8d1969ae67a145b9d07ebd6f0712628a7 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 11 Sep 2026 08:48:55 +0000 Subject: [PATCH] feat(ci): add skip_local input to skip local E2E jobs on workflow_dispatch Add optional `skip_local` boolean input (default: false) to the e2e-tests workflow. When set to true via workflow_dispatch, skips build-local and e2e-tests-local jobs to avoid blocking self-hosted runners during staging-only validation (e.g. multi_address_2_regtest). Changes: - Add skip_local input to workflow_dispatch with description - Update build-local and e2e-tests-local job conditions to skip when true - Update e2e-status to accept skipped local when skip_local is requested Usage: gh workflow run e2e-tests -f e2e_branch=... -f skip_local=true Co-authored-by: piotr-iohk --- .github/workflows/e2e-tests.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 4108d43b8..d3adb7ba3 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -7,6 +7,11 @@ on: description: "Branch of synonymdev/bitkit-e2e-tests to use (main | default-feature-branch | custom branch name)" required: false default: "default-feature-branch" + skip_local: + description: "Skip local E2E jobs (build-local + e2e-tests-local) — useful for staging-only validation" + type: boolean + required: false + default: false pull_request: types: [opened, synchronize, reopened, ready_for_review] @@ -43,7 +48,7 @@ jobs: build-local: needs: detect-changes - if: github.event.pull_request.draft == false && needs.detect-changes.outputs.code == 'true' + if: github.event.pull_request.draft == false && needs.detect-changes.outputs.code == 'true' && github.event.inputs.skip_local != 'true' runs-on: macos-latest steps: @@ -229,7 +234,7 @@ jobs: e2e_branch_input: ${{ github.event.inputs.e2e_branch || 'default-feature-branch' }} e2e-tests-local: - if: github.event.pull_request.draft == false && needs.detect-changes.outputs.code == 'true' + if: github.event.pull_request.draft == false && needs.detect-changes.outputs.code == 'true' && github.event.inputs.skip_local != 'true' runs-on: [self-hosted, macOS] needs: [detect-changes, build-local, e2e-branch] @@ -518,9 +523,27 @@ jobs: - name: Verify all E2E shards succeeded if: needs.detect-changes.outputs.code == 'true' + env: + LOCAL_RESULT: ${{ needs.e2e-tests-local.result }} + STAGING_RESULT: ${{ needs.e2e-tests-staging.result }} + SKIP_LOCAL: ${{ github.event.inputs.skip_local }} run: | - if [ "${{ needs.e2e-tests-local.result }}" != "success" ] || [ "${{ needs.e2e-tests-staging.result }}" != "success" ]; then - echo "❌ Some E2E shards failed." + echo "Local result: $LOCAL_RESULT" + echo "Staging result: $STAGING_RESULT" + echo "Skip local: $SKIP_LOCAL" + + # Staging must always succeed + if [ "$STAGING_RESULT" != "success" ]; then + echo "❌ Staging E2E shards failed." exit 1 fi - echo "✅ All E2E shards passed!" + + # Local must succeed unless skip_local was requested + if [ "$SKIP_LOCAL" = "true" ]; then + echo "✅ Local E2E skipped (skip_local=true), staging passed!" + elif [ "$LOCAL_RESULT" != "success" ]; then + echo "❌ Local E2E shards failed." + exit 1 + else + echo "✅ All E2E shards passed!" + fi