diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 743e92dafa..e2328c9e98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,14 +6,29 @@ on: pull_request: branches: [ master, vnext ] +# A new push supersedes whatever is still running for the same PR, so cancel it +# rather than paying for eight jobs worth of results nobody will read. head_ref +# keeps the group per-PR; the fallback matters only if a push trigger is ever added. +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: build-and-verify: runs-on: ubuntu-latest strategy: + # Report every platform/language combination instead of stopping at the + # first failure — a JP-only break should not hide the EN results. + fail-fast: false matrix: platform: ['angular', 'react', 'webcomponents', 'blazor'] + # Japanese is built as well as English because the two resolve content + # differently: docs/angular/astro.config.ts maps @xplat-images to + # src/content//images, so an image that exists in EN does not + # satisfy a JP import, and an EN-only build never notices. + lang: ['en', 'jp'] steps: - name: Checkout @@ -30,13 +45,13 @@ jobs: # DOCS_TOC_STRICT fails the build when a toc.json entry points at a # missing file, instead of silently dropping it from the sidebar. - - name: Build ${{ matrix.platform }} - run: npm run xplat:build:${{ matrix.platform }} + - name: Build ${{ matrix.platform }} (${{ matrix.lang }}) + run: npm run xplat:build:${{ matrix.platform }}${{ matrix.lang == 'jp' && ':jp' || '' }} env: DOCS_TOC_STRICT: 'true' - - name: Build Angular Unique + - name: Build Angular Unique (${{ matrix.lang }}) if: matrix.platform == 'angular' - run: npm run angular:build + run: npm run angular:build${{ matrix.lang == 'jp' && ':jp' || '' }} env: DOCS_TOC_STRICT: 'true'