Skip to content

Commit 3c7fc9e

Browse files
committed
ci: add the missing docs drift check and drop the duplicated pre-commit static analysis
1 parent 0361ee0 commit 3c7fc9e

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ jobs:
4141
git diff --exit-code -- specs/openapi.json src/Generated src/Roxy.php src/Version.php tests/Generated \
4242
|| { echo 'codegen drift: commit the regenerated files'; exit 1; }
4343
44+
# Unlike the TS, Go and .NET generators, scripts/generate.mjs does NOT sync docs, so this
45+
# cannot be folded into the step above. Without it a --no-verify push lands drifted
46+
# README/AGENTS with nothing to catch it.
47+
- name: Docs drift check
48+
if: matrix.php == '8.2'
49+
run: |
50+
node scripts/sync-docs.mjs
51+
git diff --exit-code -- README.md AGENTS.md \
52+
|| { echo 'docs drift: commit the regenerated README.md/AGENTS.md'; exit 1; }
53+
4454
- name: Lint
4555
if: matrix.php == '8.2'
4656
run: vendor/bin/pint --test

lefthook.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ pre-commit:
55
glob: "*.php"
66
run: vendor/bin/pint {staged_files}
77
stage_fixed: true
8-
phpstan:
9-
run: vendor/bin/phpstan analyse --no-progress --memory-limit=512M
108
docs-sync:
119
glob: "{specs/openapi.json,scripts/tag-descriptions.mjs,scripts/sync-docs.mjs}"
1210
run: node scripts/sync-docs.mjs && git add README.md AGENTS.md

0 commit comments

Comments
 (0)