Skip to content

Commit 1c5fef0

Browse files
ci: check for unstaged files correctly during gen (#142)
Discovered in #141 that CI could pass even when `make gen` could produce a new file.
1 parent 1ef2a69 commit 1c5fef0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ jobs:
5454

5555
- name: git diff
5656
run: |
57-
git diff --compact-summary --exit-code || \
58-
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
57+
if [[ -n $(git ls-files --other --modified --exclude-standard) ]]; then
58+
echo "Unexpected difference in directories after code generation. Run 'make gen' and include the output in the commit."
59+
exit 1
60+
fi
5961
6062
# Run acceptance tests in a matrix with Terraform CLI versions
6163
test:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy