ci: type check the docs site - #754
Merged
Merged
Conversation
The Docusaurus build transpiles TypeScript without checking it, so a type error builds clean. Verified: a deliberate string-to-number assignment fails typecheck with TS2322 while the build exits 0 and prints the bad value. This is why the TypeScript 7 bump showed every check green while the typecheck script was broken. The workflow now also triggers on itself, so a change here is exercised by the PR that makes it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #753
Summary
test-deploy.ymlran onlypnpm run build, and the Docusaurus build transpiles TypeScript without checking it. A type error inwebsite/passed CI silently.Changes
test-deploy.yml: runpnpm run typecheckbefore the build. It is the cheaper of the two, so it fails first.test-deploy.yml: trigger on changes to the workflow itself, so this PR exercises the new step rather than deferring proof to the next unrelated docs change.Testing
Appended a deliberate type error to
website/src/pages/index.tsxand ran both scripts against it:The build cannot catch this, which is the gap being closed. The probe was reverted and
website/confirmed clean before committing.Also checked that
typecheckpasses from a clean checkout with no generated.docusaurusdirectory, so it does not depend on running after the build.Verified against live branch protection that
Test docs buildis not one of the 11 required checks, and the job name is unchanged, so nothing about the required set moves. The new step is namedType check, but steps do not create check names, so there is no collision with the requiredType check (mypy)job.Type of Change
ci:)Checklist
Closes #Ntype:*and onepriority:*labelphase:*label (or none when not roadmap work)