Skip to content

feat(ci): build Japanese as well as English on PRs - #875

Open
ChronosSF wants to merge 5 commits into
vnextfrom
feat/ci-validate-jp-builds
Open

ChronosSF wants to merge 5 commits into
vnextfrom
feat/ci-validate-jp-builds

Conversation

@ChronosSF

@ChronosSF ChronosSF commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Expected to be red until #873 merges. Exactly one job — build-and-verify (angular, jp) — fails, at the Build Angular Unique (jp) step, on the missing JP carousel image. That is the bug this PR is designed to catch, so it failing here is the change working. See Verification below.

Problem

CI built English only. The matrix covered platforms, not languages, and both build steps used the default (EN) scripts. Nothing in PR validation ever exercised Japanese, so JP-only breakage reached vnext and was found by a deploy instead of by a check.

An EN build is not a proxy for a JP one, because the two do not resolve content identically. docs/angular/astro.config.ts maps @xplat-images to src/content/<lang>/images, so an image present in EN does not satisfy a JP import — which is exactly how #873 happened, and what #842 asks for a check against.

Change

Add a lang axis to the existing matrix, taking build-and-verify from 4 jobs to 8:

matrix:
  platform: ['angular', 'react', 'webcomponents', 'blazor']
  lang: ['en', 'jp']

Each build step picks the language variant by suffix, so the EN legs run exactly the commands they run today and the JP legs run the same scripts the deploy workflows use:

lang xplat step Angular-unique step
en npm run xplat:build:<platform> npm run angular:build
jp npm run xplat:build:<platform>:jp npm run angular:build:jp

DOCS_TOC_STRICT: 'true' applies to both languages, so a toc.json entry pointing at a missing file now fails the JP build too, not just EN.

Also sets fail-fast: false. With two languages in the matrix the default would let a JP failure cancel the EN jobs, hiding results still worth seeing.

Verification

Run locally against this matrix:

  • DOCS_TOC_STRICT=true npm run xplat:build:{angular,react,webcomponents,blazor}:jp — all four pass. No pre-existing JP strict-TOC problems, so nothing else here is lying in wait.
  • DOCS_TOC_STRICT=true npm run angular:build:jp — fails on vnext with the carousel ImageNotFound; passes on fix(jp/angular): complete the carousel xplat sync for Japanese #873's branch (421 pages).

So once #873 is in, this goes green on all 8. It will need a merge from vnext after that to pick the fix up.

Cost

Doubles build-and-verify from 4 jobs to 8. They run in parallel, so wall-clock is roughly unchanged; runner minutes roughly double.

Partly offset by the concurrency group added here: pushing to a PR now cancels the run it supersedes, instead of leaving all eight jobs to finish for a result nobody reads. Grouping is on head_ref so other PRs are untouched, and cancelling is safe because these jobs only build — nothing is published or deployed, so a job killed mid-step leaves no partial state. The one tradeoff is that a run cancelled mid-flight gives partial logs rather than a final failure summary.

If cost still matters after that, the remaining lever is narrowing the JP axis to Angular only — Angular is where the per-locale @xplat-images resolution actually bites, and the xplat JP builds are the cheaper half of the value.

Related

🤖 Generated with Claude Code

ChronosSF and others added 5 commits September 29, 2026 17:20
CI built English only: the matrix covered platforms, not languages, and both
build steps used the default (EN) scripts. Nothing in PR validation ever
exercised JP, so JP-only breakage reached vnext and was found by a deploy.

The two languages do not resolve content identically, so an EN build is not
a proxy for a JP one. docs/angular/astro.config.ts maps @xplat-images to
src/content/<lang>/images, which means an image present in EN does not
satisfy a JP import — exactly how #873 happened, and what #842 asks for.

Adds a lang axis to the existing matrix, taking it from 4 jobs to 8. The JP
scripts already exist and are what the deploy workflows run, so each job is
the same build the corresponding deploy performs, with DOCS_TOC_STRICT on.

Also sets fail-fast: false. With two languages in the matrix the default
would let a JP failure cancel the EN jobs, hiding results that are still
worth seeing.

Related to #842, #873

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Doubling the matrix to eight jobs makes superseded runs expensive: without a
concurrency group, pushing to a PR leaves the previous run building all eight
to completion while the new one starts, and nobody reads the old result.

Grouping on head_ref keeps this per-PR, so runs on other PRs are untouched.
The github.ref fallback is inert while this workflow is pull_request-only; it
matters only if a push trigger is ever added.

Safe to cancel here because these jobs only build — nothing is published or
deployed, so a job killed mid-step leaves no partial state behind.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant