chore(Makefile): update golden files as part of make gen (#17039)

Updating golden files is an unnecessary extra step in addition to gen
that is easily overlooked, leading to the developer noticing the issue
in CI leading to lost developer time waiting for tests to complete.
This commit is contained in:
Mathias Fredriksson
2025-03-21 13:04:30 +00:00
committed by GitHub
parent de6080c46d
commit b79167293c
8 changed files with 37 additions and 34 deletions
+4 -7
View File
@@ -267,18 +267,15 @@ jobs:
popd
- name: make gen
# no `-j` flag as `make` fails with:
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
run: "make --output-sync -B gen"
- name: make update-golden-files
run: |
# Remove golden files to detect discrepancy in generated files.
make clean/golden-files
# Notifications require DB, we could start a DB instance here but
# let's just restore for now.
git checkout -- coderd/notifications/testdata/rendered-templates
# As above, skip `-j` flag.
make --output-sync -B update-golden-files
# no `-j` flag as `make` fails with:
# coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
make --output-sync -B gen
- name: Check for unstaged files
run: ./scripts/check_unstaged.sh