Skip to content

Commit 1842745

Browse files
committed
add CI step to print baselines
1 parent 09bd8af commit 1842745

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/ci.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,23 @@ jobs:
7373
# Installing gotestsum is super slow on Windows.
7474
if: ${{ matrix.os != 'windows-latest' }}
7575

76-
- run: npx hereby test:all ${RACE_FLAG:+"$RACE_FLAG"} ${NOEMBED_FLAG:+"$NOEMBED_FLAG"}
76+
- name: Tests
77+
id: test
78+
run: npx hereby test:all ${RACE_FLAG:+"$RACE_FLAG"} ${NOEMBED_FLAG:+"$NOEMBED_FLAG"}
7779
env:
7880
RACE_FLAG: ${{ (matrix.race && '--race') || '' }}
7981
NOEMBED_FLAG: ${{ (matrix.noembed && '--noembed') || '' }}
8082

8183
- run: git add .
8284
- run: git diff --staged --exit-code --stat
8385

86+
- name: Print baseline diff on failure
87+
if: ${{ failure() && steps.test.conclusion == 'failure' }}
88+
run: |
89+
npx hereby baseline-accept
90+
git add testdata/baselines/reference
91+
git diff --staged --exit-code
92+
8493
lint:
8594
runs-on: ubuntu-latest
8695
steps:

0 commit comments

Comments
 (0)