Skip to content

Commit f072c9d

Browse files
committed
Snapshot custom-step rendering with Verify instead of manual literals
Switch GitHubActionsCustomStepSpecs from hand-authored expected strings + a line-ending-normalizing helper to Verify, matching the generator testing strategy used elsewhere. Verify normalizes line endings on compare, and the new '*.verified.* text eol=lf' gitattribute keeps the snapshots LF in the repo, so the exact-output assertions are platform-independent without bespoke scaffolding.
1 parent 475d19e commit f072c9d

11 files changed

Lines changed: 77 additions & 102 deletions

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
*.DotSettings text eol=lf
77
*.sh text eol=lf
88

9+
# Verify snapshots are compared with normalized (LF) line endings; keep them LF in the repo.
10+
*.verified.* text eol=lf
11+
912
###############################################################################
1013
# Set default behavior for command prompt diff.
1114
#
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
- name: 'Full'
2+
id: full
3+
uses: some/action@v1
4+
with:
5+
k: v
6+
env:
7+
E: 1
8+
if: success()
9+
continue-on-error: true
10+
timeout-minutes: 5
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- uses: some/action@v1
2+
with:
3+
alpha: 1
4+
beta: 2
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- run: |
2+
echo one
3+
echo two
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: 'Deploy: prod'
2+
run: echo hi
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: 'Bob''s step'
2+
run: echo hi
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- run: gci
2+
shell: pwsh
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: 'Echo'
2+
run: echo hi
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: 'Setup Node'
2+
uses: actions/setup-node@v4
3+
with:
4+
node-version: 20
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)