Skip to content

Commit 7e728f6

Browse files
Allow the e2e suites to be run manually against master (#833)
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. Verified by labelling this PR: all three e2e suites ran and passed via the existing label route, confirming the added condition does not break it. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Richard Wall <richard.wall@cyberark.com>
1 parent 2463606 commit 7e728f6

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches: [master]
55
pull_request: {}
6+
# Lets us run the e2e suites against master, which the label gates below
7+
# cannot do: they read github.event.pull_request.labels, which is empty for
8+
# a push. Needed before tagging a release.
9+
workflow_dispatch: {}
610
jobs:
711
verify:
812
runs-on: ubuntu-latest
@@ -80,7 +84,7 @@ jobs:
8084
# where the e2e fails with a 400 error relating to "conflicting tagging values"
8185
# The test is flaky, not broken and re-running eventually makes it pass - but that delays progress on
8286
# other unrelated work.
83-
if: contains(github.event.pull_request.labels.*.name, 'test-ark')
87+
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-ark')
8488
runs-on: ubuntu-latest
8589
steps:
8690
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -117,7 +121,7 @@ jobs:
117121

118122
ngts-test-e2e:
119123
# TEMPORARY: require an explicit label to test NGTS until we have a stable test environment
120-
if: contains(github.event.pull_request.labels.*.name, 'test-ngts')
124+
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-ngts')
121125
runs-on: ubuntu-latest
122126
steps:
123127
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -151,7 +155,7 @@ jobs:
151155
NGTS_TSG_URL: https://1806660206.ngts.qa.venafi.io
152156

153157
test-e2e:
154-
if: contains(github.event.pull_request.labels.*.name, 'test-e2e')
158+
if: github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'test-e2e')
155159
runs-on: ubuntu-latest
156160
steps:
157161
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

0 commit comments

Comments
 (0)