You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(e2e): bootstrap behaviour job on main for pull_request_target
The e2e workflow runs on pull_request_target, so GitHub loads the
workflow definition from the PR base branch (main), not the PR head.
PR #1982 adds the full Gherkin behaviour suite and workflow wiring on
its branch, but those workflow changes cannot execute in CI until they
land on main.
This minimal bootstrap PR merges first: a behaviour job in e2e.yml, a
make behaviour-test target, and a placeholder TestBehaviourCIWiring
test so the job compiles and passes. Once this is on main, PR #1982
will run real behaviour tests against its head under the new job.
Signed-off-by: Barak Korren <bkorren@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: .github/workflows/e2e.yml
+104-2Lines changed: 104 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,29 @@ permissions: {}
9
9
on:
10
10
push:
11
11
branches: [main]
12
-
# SYNC-WITH: grep regex in "Check for e2e-relevant changes" step in the e2e job
12
+
# SYNC-WITH: grep in "Check for e2e-relevant changes" (e2e job) and
13
+
# "Check for behaviour-relevant changes" (behaviour job)
13
14
paths:
14
15
- '**/*.go'
15
16
- 'go.mod'
16
17
- 'go.sum'
17
18
- 'e2e/**'
19
+
- 'e2e/behaviour/**'
18
20
- 'internal/scaffold/fullsend-repo/**'
19
21
- 'internal/security/hooks/**'
20
22
- 'internal/dispatch/gcf/mintsrc/**'
21
23
- 'internal/sentencetoken/english.json'
24
+
- 'internal/runtime/**'
25
+
- 'internal/sandbox/**'
26
+
- 'internal/config/**'
27
+
- 'internal/cli/github.go'
28
+
- 'internal/cli/run.go'
29
+
- 'internal/layers/**'
30
+
- 'internal/forge/**'
31
+
- 'internal/harness/**'
32
+
- 'internal/dispatch/**'
33
+
- 'internal/mintclient/**'
34
+
- 'cmd/fullsend/**'
22
35
- 'Makefile'
23
36
- '.github/workflows/e2e.yml'
24
37
- '.github/actions/check-e2e-authorization/**'
@@ -113,7 +126,7 @@ jobs:
113
126
exit 0
114
127
}
115
128
fi
116
-
if echo "$FILES" | grep -qE '\.go$|^go\.(mod|sum)$|^e2e/|^internal/scaffold/fullsend-repo/|^internal/security/hooks/|^internal/dispatch/gcf/mintsrc/|^internal/sentencetoken/english\.json$|^Makefile$|^\.github/workflows/e2e\.yml$|^\.github/actions/check-e2e-authorization/|^scripts/check-e2e-authorization\.sh$'; then
129
+
if echo "$FILES" | grep -qE '\.go$|^go\.(mod|sum)$|^e2e/|^e2e/behaviour/|^internal/scaffold/fullsend-repo/|^internal/security/hooks/|^internal/dispatch/gcf/mintsrc/|^internal/sentencetoken/english\.json$|^Makefile$|^\.github/workflows/e2e\.yml$|^\.github/actions/check-e2e-authorization/|^scripts/check-e2e-authorization\.sh$'; then
FILES=$(gh api "repos/${REPO}/compare/${MERGE_GROUP_BASE}...${MERGE_GROUP_HEAD}" --jq '.files[].filename') || {
199
+
echo "::warning::Failed to fetch merge group files — running behaviour tests as a precaution"
200
+
echo "relevant=true" >> "$GITHUB_OUTPUT"
201
+
exit 0
202
+
}
203
+
FILE_COUNT=$(echo "$FILES" | wc -l)
204
+
if [ "$FILE_COUNT" -ge 300 ]; then
205
+
echo "::warning::Compare API returned $FILE_COUNT files (possible truncation at 300) — running behaviour tests as a precaution"
206
+
echo "relevant=true" >> "$GITHUB_OUTPUT"
207
+
exit 0
208
+
fi
209
+
else
210
+
FILES=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate --jq '.[].filename') || {
211
+
echo "::warning::Failed to fetch PR files — running behaviour tests as a precaution"
212
+
echo "relevant=true" >> "$GITHUB_OUTPUT"
213
+
exit 0
214
+
}
215
+
fi
216
+
if echo "$FILES" | grep -qE '^e2e/behaviour/|^e2e/admin/|^internal/runtime/|^internal/sandbox/|^internal/config/|^internal/cli/github\.go$|^internal/cli/run\.go$|^internal/layers/|^internal/scaffold/|^internal/forge/|^internal/harness/|^internal/dispatch/|^internal/security/hooks/|^internal/mintclient/|^cmd/fullsend/|^go\.(mod|sum)$|^Makefile$|^\.github/workflows/e2e\.yml$|^\.github/actions/check-e2e-authorization/|^scripts/check-e2e-authorization\.sh$'; then
0 commit comments