File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,14 +32,16 @@ jobs:
3232 - name : Install dependencies
3333 run : npm ci
3434
35- - name : Move the committed index.js file
36- run : mv dist/ /tmp/
37-
38- - name : Rebuild the index.js file
35+ - name : Rebuild the dist/ directory
3936 run : npm run build
4037
41- - name : Compare the expected and actual index.js files
42- run : git diff --ignore-all-space dist/ /tmp/dist
38+ - name : Compare the expected and actual dist/ directories
39+ run : |
40+ if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
41+ echo "Detected uncommitted changes after build. See status below:"
42+ git diff
43+ exit 1
44+ fi
4345 id : diff
4446
4547 # If index.js was different than expected, upload the expected version as an artifact
Original file line number Diff line number Diff line change 4747 run : npm run lint
4848 - name : Build & Test
4949 run : npm run test
50- - name : Ensure dist/ folder is up-to-date
51- if : ${{ runner.os == 'Linux' }}
52- shell : bash
53- run : |
54- npm run build
55- if [ "$(git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
56- echo "Detected uncommitted changes after build. See status below:"
57- git diff
58- exit 1
59- fi
60-
6150
6251 # End to end save and restore
6352 test-save :
You can’t perform that action at this time.
0 commit comments