ci: parallelize pipeline, add concurrency, i18n check, and PR-size labels#760
Conversation
|
Thanks for putting time into this and for the detailed benchmarks. The CI parallelization part looks useful, but I’d prefer to keep it separate from the tooling migration. Replacing the project’s lint/format stack is a project-wide tooling decision, and I’d like to discuss that first before accepting a PR that changes ESLint/Prettier to oxlint/oxfmt. For now, this project will keep ESLint + Prettier as the authoritative tooling. I’m not comfortable replacing the formatter with oxfmt yet, especially since it currently produces formatting that conflicts with Prettier in this repo. Would you be open to splitting this into a smaller PR that only parallelizes the existing CI checks while keeping the current tools unchanged? Please also keep Chrome, Firefox, and Safari builds running on PRs. That focused CI parallelization change would be much easier to review and is likely acceptable. |
…bels Split the single serial CI job into 7 parallel jobs: | Job | Steps | |---|---| | format | prettier --check | | lint | eslint | | typecheck | tsc --noEmit | | test | vitest | | build (Chrome/Firefox/Safari) | 3 parallel matrix jobs | | i18n | locale key consistency across 10 locales | | pr-size | auto-label S/M/L/XL on PRs | Before: 1 job, 8 serial steps (~120s wall time). After: 7 parallel jobs (~30s wall time, longest job wins). Also adds concurrency group to cancel in-progress runs on the same PR/branch, and switches to bun install --frozen-lockfile for deterministic installs. Keeps ESLint + Prettier unchanged. Keeps all 3 browser builds on PRs.
ae2a431 to
aafb25b
Compare
Fork PRs run with a read-only GITHUB_TOKEN that cannot write labels. Add head.repo.full_name == github.repository guard so the job is skipped on cross-repo PRs (maintainer can label manually).
Refactored the PR. |
|
Thanks so much! |
Summary
Split the single serial CI job into 7 parallel jobs, add concurrency cancellation, an i18n consistency check, and automatic PR size labeling. No changes to existing tooling — ESLint, Prettier, and all browser builds are kept exactly as-is.
Before → After
Pipeline structure
Before: 1 job, 8 serial steps (format → lint → typecheck → test → build:chrome → build:firefox → build:safari)
After: 7 independent parallel jobs:
prettier --check .eslint .tsc --noEmitvitest runmessages.jsonkeys againsten/size/S·size/M·size/L·size/XLWall time
Changes
Concurrency
Added
concurrencygroup to cancel in-progress CI runs when a new commit is pushed to the same PR/branch. Saves runner minutes on rapid pushes.i18n consistency check
Compares all 10 locale files against
en/messages.jsonand fails on missing or extra keys. This catches the most common translation PR mistake — adding a key to en/ but forgetting other locales (or vice versa).PR size labels
Automatically labels PRs by total changed lines:
< 50→size/S,< 200→size/M,< 500→size/L,≥ 500→size/XL. Helps maintainers gauge review effort at a glance.Install step
Switched from
bun itobun install --frozen-lockfilefor deterministic CI installs.What's NOT changed
Testing
The CI workflow itself is the change — all existing lint/typecheck/test/build commands remain identical.