From 0d9b9b92e2aca2f75c979a801abbc21bff473748 Mon Sep 17 00:00:00 2001 From: TypeScript Bot <23042052+typescript-bot@users.noreply.github.com> Date: Thu, 31 Jul 2025 22:12:22 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Pick=20PR=20#61978=20(Restructur?= =?UTF-8?q?e=20CI=20to=20prepare=20for=20requi...)=20into=20release-5.9=20?= =?UTF-8?q?(#62164)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> --- .github/workflows/ci.yml | 146 ++++++++++++++++++++++++++++++++------- 1 file changed, 121 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21b21ed824f..952cb7cba6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,10 @@ on: branches: - main - release-* + merge_group: + branches: + - main + # - release-* permissions: contents: read @@ -24,43 +28,107 @@ jobs: strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - windows-latest - - macos-latest - node-version: - - '22' - - '20' - - '18' - - '16' - - '14' - bundle: - - 'true' - include: - - node-version: 'lts/*' - bundle: false - os: ubuntu-latest - exclude: - # No Node 14 on ARM macOS - - node-version: '14' - os: macos-latest + config: + # Main builds + - os: ubuntu-latest + node-version: '24' + bundle: true - runs-on: ${{ matrix.os }} - name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }} + # Other builds (skipped in merge queues) + - os: windows-latest + node-version: '24' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + - os: macos-latest + node-version: '24' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + - os: ubuntu-latest + node-version: '22' + bundle: true + - os: windows-latest + node-version: '22' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + # Skip macOS for this version; resources are limited. + # - os: macos-latest + # node-version: '22' + # bundle: true + # skip: ${{ github.event_name == 'merge_group' }} + - os: ubuntu-latest + node-version: '20' + bundle: true + - os: windows-latest + node-version: '20' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + # Skip macOS for this version; resources are limited. + # - os: macos-latest + # node-version: '20' + # bundle: true + # skip: ${{ github.event_name == 'merge_group' }} + - os: ubuntu-latest + node-version: '18' + bundle: true + - os: windows-latest + node-version: '18' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + # Skip macOS for this version; resources are limited. + # - os: macos-latest + # node-version: '18' + # bundle: true + # skip: ${{ github.event_name == 'merge_group' }} + - os: ubuntu-latest + node-version: '16' + bundle: true + - os: windows-latest + node-version: '16' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + - os: macos-latest + node-version: '16' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + - os: ubuntu-latest + node-version: '14' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + - os: windows-latest + node-version: '14' + bundle: true + skip: ${{ github.event_name == 'merge_group' }} + # No Node 14 on ARM macOS + # - os: macos-latest + # node-version: '14' + # bundle: true + # skip: ${{ github.event_name == 'merge_group' }} + + - os: ubuntu-latest + node-version: 'lts/*' + bundle: false + skip: ${{ github.event_name == 'merge_group' }} + + exclude: + - config: + skip: true + + runs-on: ${{ matrix.config.os }} + name: Test Node ${{ matrix.config.node-version }} on ${{ matrix.config.os }}${{ (!matrix.config.bundle && ' with --no-bundle') || '' }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Use node version ${{ matrix.node-version }} + - name: Use node version ${{ matrix.config.node-version }} uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ matrix.config.node-version }} check-latest: true - run: npm ci - name: Tests id: test # run tests, but lint separately - run: npm run test -- --no-lint --bundle=${{ matrix.bundle }} + run: npm run test -- --no-lint --bundle=${{ matrix.config.bundle }} - name: Print baseline diff on failure if: ${{ failure() && steps.test.conclusion == 'failure' }} @@ -70,6 +138,8 @@ jobs: git diff --staged --exit-code coverage: + if: ${{ github.event_name != 'merge_group' }} + runs-on: - 'self-hosted' - '1ES.Pool=TypeScript-1ES-GitHub-Large' @@ -294,6 +364,8 @@ jobs: run: npx hereby build-src --built baselines: + if: ${{ github.event_name != 'merge_group' }} + runs-on: ubuntu-latest steps: @@ -338,3 +410,27 @@ jobs: with: name: fix_baselines.patch path: fix_baselines.patch + + required: + runs-on: ubuntu-latest + if: ${{ always() }} + needs: + - test + - coverage + - lint + - knip + - format + - browser-integration + - typecheck + - smoke + - package-size + - misc + - self-check + - baselines + + steps: + - name: Check required jobs + env: + NEEDS: ${{ toJson(needs) }} + run: | + ! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select((.result == "success" or .result == "skipped") | not)'