Skip to content

Commit f854363

Browse files
committed
ci: make the local codegen drift hook hermetic too
1 parent c3d64fc commit f854363

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lefthook.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ pre-push:
2121
phpstan:
2222
run: vendor/bin/phpstan analyse --no-progress --memory-limit=512M
2323
priority: 2
24+
# Hermetic: regenerates from the committed spec, so this verifies the committed code still
25+
# reproduces from it, with no network dependency. Refreshing the spec is the release job.
2426
codegen-drift:
27+
env:
28+
ROXYAPI_SPEC_FILE: specs/openapi.json
2529
run: node scripts/generate.mjs && git diff --exit-code -- specs/openapi.json src/Generated src/Roxy.php src/Version.php tests/Generated || { echo 'codegen drift: commit the regenerated files'; exit 1; }
2630
priority: 3
2731
docs-drift:

0 commit comments

Comments
 (0)