-
Notifications
You must be signed in to change notification settings - Fork 106
570 lines (529 loc) · 22.3 KB
/
Copy pathtest-fabric-stack-actions.yml
File metadata and controls
570 lines (529 loc) · 22.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
name: Test fabric-stack composite actions
on:
pull_request:
paths:
- ".github/actions/detect-fabric-stack/**"
- ".github/actions/overlay-local-fabric/**"
- ".github/actions/wait-and-download-fabric-prebuilds/**"
- ".github/scripts/test/fixtures/fabric-actions/**"
- ".github/workflows/test-fabric-stack-actions.yml"
workflow_dispatch:
permissions:
contents: read
actions: read
jobs:
detect-fabric-stack:
name: Detect fabric-stack changes
runs-on: ubuntu-24.04
timeout-minutes: 5
env:
# The merge base the mocks hand back. Distinct from base.sha, so a diff
# taken from the base branch tip is distinguishable from one taken from
# the branch point. Quoted, and carrying hex letters: an all-digit scalar
# is a YAML number, and 40 digits reach the mock as 1.11111111111111E+39.
MOCK_MERGE_BASE: 'a1b2c3d4e5f60718293a4b5c6d7e8f9012345678'
MOCK_LOCAL_MERGE_BASE: 'b2c3d4e5f60718293a4b5c6d7e8f90123456789a'
steps:
- name: Checkout tested revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
fetch-depth: 0
- name: Run detection action against the real repository
id: smoke
uses: ./.github/actions/detect-fabric-stack
- name: Verify the unmocked run produced a boolean
shell: bash
env:
ACTUAL: ${{ steps.smoke.outputs.fabric_stack }}
run: |
set -euo pipefail
# Shape, not value. What this PR touches and how far the base branch
# has drifted both move the value, and the fetch fail-safe legitimately
# returns true — pinning an expectation here reds the build when the
# action behaves correctly. The predicate itself is driven below.
case "$ACTUAL" in
true|false) ;;
*)
echo "::error::Expected a boolean fabric_stack, got '$ACTUAL'"
exit 1
;;
esac
- name: Install mock Git and mock GitHub CLI
shell: bash
env:
MOCK_BIN: ${{ runner.temp }}/fabric-actions-mock-git
run: |
set -euo pipefail
mkdir -p "$MOCK_BIN"
cp .github/scripts/test/fixtures/fabric-actions/mock-git "$MOCK_BIN/git"
cp .github/scripts/test/fixtures/fabric-actions/mock-gh "$MOCK_BIN/gh"
chmod +x "$MOCK_BIN/git" "$MOCK_BIN/gh"
node -e '
const fs = require("node:fs")
fs.appendFileSync(process.env.GITHUB_PATH, `${process.env.MOCK_BIN}\n`)
'
- name: Run detection with a diff touching no fabric path
id: unrelated
if: github.event_name == 'pull_request'
uses: ./.github/actions/detect-fabric-stack
env:
MOCK_COMPARE_MERGE_BASE: ${{ env.MOCK_MERGE_BASE }}
MOCK_GIT_DIFF_ARGS_FILE: ${{ runner.temp }}/diff-args-unrelated
MOCK_GIT_DIFF_FILES: |
packages/llm-llamacpp/addon/binding.cpp
packages/sdk/index.ts
- name: Verify an unrelated diff is read from the merge base and reports false
if: github.event_name == 'pull_request'
shell: bash
env:
ACTUAL: ${{ steps.unrelated.outputs.fabric_stack }}
DIFF_ARGS: ${{ runner.temp }}/diff-args-unrelated
BASE_SHA: ${{ github.event.pull_request.base.sha }}
MERGE_BASE: ${{ env.MOCK_MERGE_BASE }}
run: |
set -euo pipefail
if [ "$ACTUAL" != "false" ]; then
echo "::error::Expected a non-fabric diff to report false, got $ACTUAL"
exit 1
fi
# The base branch tip is not the branch point: diffing against it also
# reports, in reverse, whatever landed on the base branch since.
if ! grep -q "$MERGE_BASE" "$DIFF_ARGS"; then
echo "::error::Diff was not taken from the merge base: $(cat "$DIFF_ARGS")"
exit 1
fi
if grep -q "$BASE_SHA" "$DIFF_ARGS"; then
echo "::error::Diff was taken from the base branch tip: $(cat "$DIFF_ARGS")"
exit 1
fi
- name: Run detection with a Fabric source change last in the diff
id: fabric-last
if: github.event_name == 'pull_request'
uses: ./.github/actions/detect-fabric-stack
env:
MOCK_COMPARE_MERGE_BASE: ${{ env.MOCK_MERGE_BASE }}
MOCK_GIT_DIFF_FILES: |
docs/ci/MERGE-GUARD.md
packages/sdk/index.ts
packages/fabric/addon/fabric.cpp
# qvac-fabric resolves from the git registry, so a new port revision only
# reaches the build through a baseline bump in this manifest.
- name: Run detection with a qvac-fabric registry baseline bump
id: registry-baseline
if: github.event_name == 'pull_request'
uses: ./.github/actions/detect-fabric-stack
env:
MOCK_COMPARE_MERGE_BASE: ${{ env.MOCK_MERGE_BASE }}
MOCK_GIT_DIFF_FILES: packages/fabric/vcpkg-configuration.json
- name: Verify both build-affecting diffs are fabric-stack PRs
if: github.event_name == 'pull_request'
shell: bash
env:
FABRIC_LAST: ${{ steps.fabric-last.outputs.fabric_stack }}
REGISTRY_BASELINE: ${{ steps.registry-baseline.outputs.fabric_stack }}
run: |
set -euo pipefail
if [ "$FABRIC_LAST" != "true" ]; then
echo "::error::Expected a Fabric source change behind unrelated files to report true, got $FABRIC_LAST"
exit 1
fi
if [ "$REGISTRY_BASELINE" != "true" ]; then
echo "::error::Expected a qvac-fabric registry baseline bump to report true, got $REGISTRY_BASELINE"
exit 1
fi
- name: Run detection with the compare API unavailable
id: local-merge-base
if: github.event_name == 'pull_request'
uses: ./.github/actions/detect-fabric-stack
env:
# MOCK_COMPARE_MERGE_BASE unset — mock-gh rejects the compare call, so
# the action must fall back to a local merge base.
MOCK_GIT_MERGE_BASE: ${{ env.MOCK_LOCAL_MERGE_BASE }}
MOCK_GIT_DIFF_ARGS_FILE: ${{ runner.temp }}/diff-args-local
MOCK_GIT_DIFF_FILES: packages/fabric/vcpkg.json
- name: Run detection with no resolvable merge base
id: no-merge-base
if: github.event_name == 'pull_request'
uses: ./.github/actions/detect-fabric-stack
env:
MOCK_GIT_MERGE_BASE: none
MOCK_GIT_DIFF_FILES: packages/sdk/index.ts
- name: Verify merge-base fallback and fail-safe
if: github.event_name == 'pull_request'
shell: bash
env:
LOCAL: ${{ steps.local-merge-base.outputs.fabric_stack }}
NO_MERGE_BASE: ${{ steps.no-merge-base.outputs.fabric_stack }}
DIFF_ARGS: ${{ runner.temp }}/diff-args-local
MERGE_BASE: ${{ env.MOCK_LOCAL_MERGE_BASE }}
run: |
set -euo pipefail
if [ "$LOCAL" != "true" ]; then
echo "::error::Expected the local merge-base path to detect a Fabric change, got $LOCAL"
exit 1
fi
if ! grep -q "$MERGE_BASE" "$DIFF_ARGS"; then
echo "::error::Diff did not use the local merge base: $(cat "$DIFF_ARGS")"
exit 1
fi
# An unresolvable merge base must not silently degrade to the base tip.
if [ "$NO_MERGE_BASE" != "true" ]; then
echo "::error::Expected an unresolvable merge base to fail safe, got $NO_MERGE_BASE"
exit 1
fi
- name: Run exact-SHA fallback with Fabric source change
id: fallback
if: github.event_name == 'pull_request'
uses: ./.github/actions/detect-fabric-stack
env:
MOCK_EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
MOCK_EXPECTED_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
MOCK_GIT_ORIGIN_FAILURE_MARKER: ${{ runner.temp }}/mock-git-origin-failed
MOCK_GIT_FALLBACK_MARKER: ${{ runner.temp }}/mock-git-fallback-used
MOCK_COMPARE_MERGE_BASE: ${{ env.MOCK_MERGE_BASE }}
MOCK_GIT_DIFF_FILES: packages/fabric/CMakeLists.txt
- name: Verify exact-SHA fallback and Fabric source detection
if: github.event_name == 'pull_request'
shell: bash
env:
ACTUAL: ${{ steps.fallback.outputs.fabric_stack }}
ORIGIN_FAILURE_MARKER: ${{ runner.temp }}/mock-git-origin-failed
FALLBACK_MARKER: ${{ runner.temp }}/mock-git-fallback-used
run: |
set -euo pipefail
if [ "$ACTUAL" != "true" ]; then
echo "::error::Expected packages/fabric source change to set fabric_stack=true, got $ACTUAL"
exit 1
fi
if [ ! -f "$ORIGIN_FAILURE_MARKER" ] || [ ! -f "$FALLBACK_MARKER" ]; then
echo "::error::Exact-SHA fallback fetch was not exercised"
exit 1
fi
- name: Run detection with a docs-only Fabric change
id: docs-only
if: github.event_name == 'pull_request'
uses: ./.github/actions/detect-fabric-stack
env:
MOCK_EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
MOCK_EXPECTED_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
MOCK_GIT_ORIGIN_FAILURE_MARKER: ${{ runner.temp }}/mock-git-origin-failed-docs
MOCK_GIT_FALLBACK_MARKER: ${{ runner.temp }}/mock-git-fallback-used-docs
MOCK_COMPARE_MERGE_BASE: ${{ env.MOCK_MERGE_BASE }}
MOCK_GIT_DIFF_FILES: |
packages/fabric/CHANGELOG.md
packages/fabric/release-notes/v1.0.0.md
packages/fabric/test/integration/smoke.js
- name: Verify docs-only Fabric change is not a fabric-stack PR
if: github.event_name == 'pull_request'
shell: bash
env:
ACTUAL: ${{ steps.docs-only.outputs.fabric_stack }}
run: |
set -euo pipefail
if [ "$ACTUAL" != "false" ]; then
echo "::error::Docs-only packages/fabric change must not set fabric_stack, got $ACTUAL"
exit 1
fi
overlay-local-fabric:
name: Overlay local fabric prebuilds
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Checkout tested revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- name: Create overlay fixtures
shell: bash
env:
TEST_ROOT: ${{ runner.temp }}/fabric-overlay-test
run: |
set -euo pipefail
node -e '
const fs = require("node:fs")
const path = require("node:path")
const root = process.argv[1]
const source = path.join(root, "source")
const destination = path.join(
root,
"consumer/node_modules/@qvac/fabric/prebuilds",
)
const planted = path.join(root, "planted")
for (const directory of [
path.join(source, "include"),
path.join(source, "share"),
path.join(source, "linux-x64"),
path.join(root, "incomplete/linux-x64"),
path.join(planted, "include"),
path.join(planted, "share"),
path.join(planted, "linux-x64"),
path.join(destination, "linux-x64"),
]) {
fs.mkdirSync(directory, { recursive: true })
}
// A symlink named like a legitimate CMake config: passes an
// extension allowlist, so only the file-type check rejects it.
fs.writeFileSync(path.join(planted, "include/fabric.h"), "header")
fs.writeFileSync(path.join(planted, "linux-x64/qvac_fabric.so"), "binary")
fs.symlinkSync(
"/etc/passwd",
path.join(planted, "share/qvac-fabricTargets.cmake"),
)
fs.writeFileSync(path.join(source, "include/fabric.h"), "header")
fs.writeFileSync(path.join(source, "share/qvac-fabric.cmake"), "cmake")
fs.writeFileSync(
path.join(source, "linux-x64/tetherto_fabric.so"),
"binary",
)
fs.writeFileSync(
path.join(destination, "linux-x64/stale-library.so"),
"stale",
)
' "$TEST_ROOT"
- name: Run overlay action
uses: ./.github/actions/overlay-local-fabric
with:
workdir: ${{ runner.temp }}/fabric-overlay-test/consumer
prebuilds-root: ${{ runner.temp }}/fabric-overlay-test/source
platform: linux
arch: x64
- name: Verify overlaid tree
shell: bash
env:
PREBUILDS: ${{ runner.temp }}/fabric-overlay-test/consumer/node_modules/@qvac/fabric/prebuilds
run: |
set -euo pipefail
node -e '
const fs = require("node:fs")
const path = require("node:path")
const root = process.argv[1]
const expected = [
"include/fabric.h",
"share/qvac-fabric.cmake",
"linux-x64/qvac_fabric.so",
]
for (const file of expected) {
if (!fs.existsSync(path.join(root, file))) {
throw new Error(`Missing overlaid file: ${file}`)
}
}
for (const file of [
"linux-x64/tetherto_fabric.so",
"linux-x64/stale-library.so",
]) {
if (fs.existsSync(path.join(root, file))) {
throw new Error(`Unexpected stale file: ${file}`)
}
}
' "$PREBUILDS"
- name: Reject incomplete fabric prebuilds
id: incomplete
continue-on-error: true
uses: ./.github/actions/overlay-local-fabric
with:
workdir: ${{ runner.temp }}/fabric-overlay-test/consumer
prebuilds-root: ${{ runner.temp }}/fabric-overlay-test/incomplete
platform: linux
arch: x64
- name: Verify incomplete fabric prebuilds were rejected
if: ${{ always() }}
shell: bash
env:
OUTCOME: ${{ steps.incomplete.outcome }}
run: |
set -euo pipefail
if [ "$OUTCOME" != "failure" ]; then
echo "::error::Expected incomplete prebuilds to fail, got $OUTCOME"
exit 1
fi
- name: Reject fabric prebuilds carrying a planted symlink
id: planted
continue-on-error: true
uses: ./.github/actions/overlay-local-fabric
with:
workdir: ${{ runner.temp }}/fabric-overlay-test/consumer
prebuilds-root: ${{ runner.temp }}/fabric-overlay-test/planted
platform: linux
arch: x64
- name: Verify planted symlink was rejected before any copy
if: ${{ always() }}
shell: bash
env:
OUTCOME: ${{ steps.planted.outcome }}
PREBUILDS: ${{ runner.temp }}/fabric-overlay-test/consumer/node_modules/@qvac/fabric/prebuilds
run: |
set -euo pipefail
if [ "$OUTCOME" != "failure" ]; then
echo "::error::Expected planted symlink to fail, got $OUTCOME"
exit 1
fi
if [ -e "$PREBUILDS/share/qvac-fabricTargets.cmake" ]; then
echo "::error::Planted symlink reached the consumer tree"
exit 1
fi
wait-and-download:
name: Wait and download fabric prebuilds
runs-on: ubuntu-24.04
# Two negative cases poll to their one-minute deadline before failing.
timeout-minutes: 10
steps:
- name: Checkout tested revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- name: Install mock GitHub CLI
shell: bash
env:
MOCK_BIN: ${{ runner.temp }}/fabric-actions-mock-bin
run: |
set -euo pipefail
mkdir -p "$MOCK_BIN"
cp .github/scripts/test/fixtures/fabric-actions/mock-gh "$MOCK_BIN/gh"
chmod +x "$MOCK_BIN/gh"
node -e '
const fs = require("node:fs")
fs.appendFileSync(process.env.GITHUB_PATH, `${process.env.MOCK_BIN}\n`)
'
- name: Run wait-and-download action
id: download
uses: ./.github/actions/wait-and-download-fabric-prebuilds
env:
MOCK_EXPECTED_HEAD_SHA: 0123456789abcdef0123456789abcdef01234567
MOCK_EXPECTED_ARTIFACT: fabric-prebuilds
with:
github-token: test-token
head-sha: 0123456789abcdef0123456789abcdef01234567
head-repo: ${{ github.repository }}
download-dir: ${{ runner.temp }}/fabric-download-test
timeout-minutes: 1
poll-seconds: 1
- name: Verify downloaded artifact
shell: bash
env:
SOURCE_RUN_ID: ${{ steps.download.outputs['source-run-id'] }}
DOWNLOAD_DIR: ${{ runner.temp }}/fabric-download-test
run: |
set -euo pipefail
if [ "$SOURCE_RUN_ID" != "4242" ]; then
echo "::error::Expected source run 4242, got $SOURCE_RUN_ID"
exit 1
fi
if [ ! -f "$DOWNLOAD_DIR/mock-download-complete" ]; then
echo "::error::Mock artifact was not downloaded"
exit 1
fi
# fabric-prebuilds-publish only runs behind a successful prebuild, so a
# producer that went red afterwards — its consumer smoke or lint, both
# downstream of the publish — still holds a good bundle. Filtering it out
# would strand every consumer re-run after such a failure.
- name: Accept a producer that concluded red after publishing
id: red-producer
uses: ./.github/actions/wait-and-download-fabric-prebuilds
env:
MOCK_EXPECTED_HEAD_SHA: 0123456789abcdef0123456789abcdef01234567
MOCK_EXPECTED_ARTIFACT: fabric-prebuilds
MOCK_RUN_STATUS: completed
MOCK_RUN_CONCLUSION: failure
with:
github-token: test-token
head-sha: 0123456789abcdef0123456789abcdef01234567
head-repo: ${{ github.repository }}
download-dir: ${{ runner.temp }}/fabric-red-producer-test
timeout-minutes: 1
poll-seconds: 1
- name: Verify the red producer's artifact was downloaded
shell: bash
env:
SOURCE_RUN_ID: ${{ steps.red-producer.outputs['source-run-id'] }}
DOWNLOAD_DIR: ${{ runner.temp }}/fabric-red-producer-test
run: |
set -euo pipefail
if [ "$SOURCE_RUN_ID" != "4242" ]; then
echo "::error::Expected source run 4242 from a red producer, got $SOURCE_RUN_ID"
exit 1
fi
if [ ! -f "$DOWNLOAD_DIR/mock-download-complete" ]; then
echo "::error::A red producer's published artifact was not downloaded"
exit 1
fi
- name: Reject a run from an unrelated head repository
id: foreign-run
continue-on-error: true
uses: ./.github/actions/wait-and-download-fabric-prebuilds
env:
MOCK_EXPECTED_HEAD_SHA: 0123456789abcdef0123456789abcdef01234567
MOCK_EXPECTED_ARTIFACT: fabric-prebuilds
MOCK_RUN_HEAD_REPO: attacker/qvac
with:
github-token: test-token
head-sha: 0123456789abcdef0123456789abcdef01234567
head-repo: ${{ github.repository }}
download-dir: ${{ runner.temp }}/fabric-foreign-run-test
timeout-minutes: 1
poll-seconds: 5
- name: Reject a run associated with a different PR
id: foreign-pr
continue-on-error: true
uses: ./.github/actions/wait-and-download-fabric-prebuilds
env:
MOCK_EXPECTED_HEAD_SHA: 0123456789abcdef0123456789abcdef01234567
MOCK_EXPECTED_ARTIFACT: fabric-prebuilds
MOCK_RUN_PULL_REQUESTS: '[{"number":999999}]'
with:
github-token: test-token
head-sha: 0123456789abcdef0123456789abcdef01234567
head-repo: ${{ github.repository }}
pr-number: '31337'
download-dir: ${{ runner.temp }}/fabric-foreign-pr-test
timeout-minutes: 1
poll-seconds: 5
- name: Verify runs failing provenance were not downloaded
if: ${{ always() }}
shell: bash
env:
FOREIGN_RUN_OUTCOME: ${{ steps.foreign-run.outcome }}
FOREIGN_PR_OUTCOME: ${{ steps.foreign-pr.outcome }}
FOREIGN_RUN_DIR: ${{ runner.temp }}/fabric-foreign-run-test
FOREIGN_PR_DIR: ${{ runner.temp }}/fabric-foreign-pr-test
run: |
set -euo pipefail
if [ "$FOREIGN_RUN_OUTCOME" != "failure" ]; then
echo "::error::Expected a foreign head repository to fail, got $FOREIGN_RUN_OUTCOME"
exit 1
fi
if [ "$FOREIGN_PR_OUTCOME" != "failure" ]; then
echo "::error::Expected a foreign PR association to fail, got $FOREIGN_PR_OUTCOME"
exit 1
fi
if [ -f "$FOREIGN_RUN_DIR/mock-download-complete" ] || [ -f "$FOREIGN_PR_DIR/mock-download-complete" ]; then
echo "::error::Artifact from an unbound run was downloaded"
exit 1
fi
- name: Reject an empty head SHA
id: empty-head-sha
continue-on-error: true
uses: ./.github/actions/wait-and-download-fabric-prebuilds
with:
github-token: test-token
head-sha: ""
download-dir: ${{ runner.temp }}/fabric-empty-sha-test
timeout-minutes: 1
poll-seconds: 1
- name: Verify empty SHA was rejected
if: ${{ always() }}
shell: bash
env:
OUTCOME: ${{ steps.empty-head-sha.outcome }}
run: |
set -euo pipefail
if [ "$OUTCOME" != "failure" ]; then
echo "::error::Expected empty head-sha input to fail, got $OUTCOME"
exit 1
fi