ci: add pull-request checks for typecheck and workflow lint - #52
Merged
Merged
Conversation
docs/CONTRIBUTING.md asks contributors to run `npm run typecheck` before
opening a PR, but nothing enforced it — the only workflow is the
workflow_dispatch-only Build and Publish, so a type regression could land
on develop unnoticed.
Adds a secret-free CI workflow on ubuntu-latest with two jobs:
- typecheck: `tsc --noEmit` under the existing strict tsconfig
- actionlint: lints the workflows themselves, using the runner labels
already declared in .github/actionlint.yaml
Installs with `--ignore-scripts` to skip postinstall's
`wdk-worklet-bundler generate`. tsc never reads the resulting 11 MB
bundle — src/app/_layout.tsx's import of it is satisfied by the wildcard
ambient declaration in src/wdk/bundle.d.ts — so this is a few minutes
saved per run with no loss of coverage. Verified against a clean clone.
npm is upgraded to 11 before installing, for the same git-dependency
reason documented in docs/ENVIRONMENT.md and .github/actions/setup-eas.
Lint and prettier jobs are intentionally left out; the workflow comments
record what each would need first.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
NirmalPatidar
self-requested a review
August 14, 2026 05:01
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.
Description
Adds
.github/workflows/ci.yaml— a secret-free CI workflow that runs on pull requests, with two jobs onubuntu-latest:tsc --noEmitunder the existing stricttsconfig.jsonactionlint, pinned to 1.7.12, picking up the self-hosted runner labels already declared in.github/actionlint.yamlIt deliberately does not build the app.
build-and-publish.yamlowns native builds; it needs signing credentials and macOS/self-hosted runners and takes tens of minutes. This runs in under a minute and needs no secrets, so it is safe on any pull request, including from forks.Motivation and Context
docs/CONTRIBUTING.mdasks contributors to runnpm run typecheckbefore opening a PR, but nothing enforced it. The only workflow in the repository isbuild-and-publish.yaml, which isworkflow_dispatch-only and never runstsc, and there are no git hooks. A type regression could therefore land unnoticed and only surface whenever someone next happened to run the check locally.The tree is currently green, so this gates from day one without blocking any existing work.
Implementation notes
Install uses
--ignore-scripts. This skipspostinstall→wdk-worklet-bundler generate, which spends minutes producing an 11 MB worklet bundle thattscnever reads: the bundle import insrc/app/_layout.tsxis satisfied by the wildcard ambient declaration insrc/wdk/bundle.d.ts. Verified against a clean clone —npm install --ignore-scriptsfollowed bytsc --noEmitexits 0 with.wdk-bundle/absent. Neither git dependency thatsrc/imports (wdk-backup-cloud,wdk-indexer-http) has apreparebuild step; both ship committed types.npm installrather thannpm ci— npm/cli#8726 makesnpm cireject a lockfile thatnpm installitself just wrote, as noted indocs/ENVIRONMENT.md. npm is upgraded to 11 before installing, for the git-dependency reason documented in the same file and in.github/actions/setup-eas.Node setup is inlined rather than reusing
.github/actions/setup-eas, which also installs the EAS CLI — a large download this job has no use for. The duplication is called out in a comment so the Node version and npm floor stay in sync.Intentionally left out
Both are recorded in comments at the top of the workflow, with what each would need first:
npm run lint— no ESLint config is committed and neithereslintnoreslint-config-expois indevDependencies, so the first run triggers Expo's interactive setup and would hang in CI.prettier --check— prettier is installed but has no config file, so it falls back to its own defaults rather thanprettier-config-standard. The tree does not currently match those defaults, so enabling this needs a repo-wide reformat — a separate decision.Verification
actionlintclean on both this workflow andbuild-and-publish.yamlnpm run typecheckexits 0 on this branchnpm install --ignore-scripts→tsc --noEmit) reproduced locally, exit 0Note for maintainers
This targets
mainrather thandevelopbecausedevelophas not been updated since 2026-04-25 and predatesNew WDK Starter RN App (#38). It has no.github/actionlint.yamland nosrc/wdk/bundle.d.ts— the two files this workflow's actionlint job and--ignore-scriptsoptimization respectively depend on — and itspackage.jsondiffers (Jest, nopostinstall). The workflow as written would not be correct there. Happy to retarget if you would rather land it elsewhere.Related Issue
No related issue — raising directly as a CI/infrastructure change. Happy to open one first if you would prefer that.
Type of change
🤖 Generated with Claude Code