From 2c55a13dc027f619d0ba708d003e6837a1d9d028 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Wed, 9 Sep 2026 10:18:06 +0000 Subject: [PATCH] Allow the e2e suites to be run manually against master The three e2e jobs are gated on `github.event.pull_request.labels`, which is empty for a push. They therefore skip on every push to master as well as on every unlabelled pull request, so nothing has run them on master for some time. That matters most just before a release, when we want to know that the commit we are about to tag actually passes end to end. Until now the only way to get an e2e run was to open a pull request and label it, which tests a merge commit rather than master itself. Adding `workflow_dispatch` gives a Run workflow button that runs all three suites against any ref, including master. The label route is unchanged for pull requests. Two things stay as they are: - The GKE cluster cleanup guard reads the same missing labels field, so on a manual run it evaluates to true and the cluster is still deleted. - The cluster name is derived from a timestamp, not the pull request, so it is already safe outside a pull request context. Note that the Run workflow button only appears once this is on the default branch, since that is where GitHub reads workflow_dispatch from. Co-Authored-By: Claude Signed-off-by: Richard Wall --- .github/workflows/tests.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f4952b96..9881a6a0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -3,6 +3,10 @@ on: push: branches: [master] pull_request: {} + # Lets us run the e2e suites against master, which the label gates below + # cannot do: they read github.event.pull_request.labels, which is empty for + # a push. Needed before tagging a release. + workflow_dispatch: {} jobs: verify: runs-on: ubuntu-latest @@ -80,7 +84,7 @@ jobs: # where the e2e fails with a 400 error relating to "conflicting tagging values" # The test is flaky, not broken and re-running eventually makes it pass - but that delays progress on # other unrelated work. - if: contains(github.event.pull_request.labels.*.name, 'test-ark') + if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-ark') runs-on: ubuntu-latest steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -117,7 +121,7 @@ jobs: ngts-test-e2e: # TEMPORARY: require an explicit label to test NGTS until we have a stable test environment - if: contains(github.event.pull_request.labels.*.name, 'test-ngts') + if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-ngts') runs-on: ubuntu-latest steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -151,7 +155,7 @@ jobs: NGTS_TSG_URL: https://1806660206.ngts.qa.venafi.io test-e2e: - if: contains(github.event.pull_request.labels.*.name, 'test-e2e') + if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-e2e') runs-on: ubuntu-latest steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1