From 14b9f438b5286be3deeee8854184f60842b48efb Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Thu, 26 Feb 2026 13:50:14 +0100 Subject: [PATCH 1/3] chore(ci): split lint/typecheck into separate checks and extract shared setup action --- .github/actions/setup-pnpm-node/action.yml | 20 +++++++ .github/workflows/test.yml | 64 ++++++++++++++++------ 2 files changed, 68 insertions(+), 16 deletions(-) create mode 100644 .github/actions/setup-pnpm-node/action.yml diff --git a/.github/actions/setup-pnpm-node/action.yml b/.github/actions/setup-pnpm-node/action.yml new file mode 100644 index 000000000..ba2712149 --- /dev/null +++ b/.github/actions/setup-pnpm-node/action.yml @@ -0,0 +1,20 @@ +name: Setup pnpm and Node dependencies +description: Setup pnpm, setup Node.js with pnpm cache, and install dependencies. +inputs: + node-version: + description: Node.js version to install. + required: true +runs: + using: composite + steps: + - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # tag=v4.1.0 + + - name: Use Node.js ${{ inputs.node-version }} + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag=v4.4.0 + with: + node-version: ${{ inputs.node-version }} + cache: pnpm + + - name: Install dependencies + shell: bash + run: pnpm install --frozen-lockfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d1276b2e..0056755cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,32 +11,64 @@ on: workflow_dispatch: jobs: - verify: - name: Verify [Node ${{ matrix.node_version }}] - runs-on: ${{ matrix.os }} - strategy: - matrix: - node_version: ['18', '20', '22', '24'] - os: [ubuntu-latest] + lint: + name: Lint (Node 24) + runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 - - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # tag=v4.1.0 - - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag=v4.4.0 + - name: Setup workspace + uses: ./.github/actions/setup-pnpm-node with: - node-version: ${{ matrix.node_version }} - cache: 'pnpm' - - - name: Install dependencies - run: pnpm install --frozen-lockfile + node-version: '24' - name: Lint run: pnpm lint:ci + typecheck: + name: TypeScript (Node 24) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 + - name: Setup workspace + uses: ./.github/actions/setup-pnpm-node + with: + node-version: '24' + - name: Type check run: pnpm typecheck + test_pr: + name: Tests [Node 24] + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 + - name: Setup workspace + uses: ./.github/actions/setup-pnpm-node + with: + node-version: '24' + + - name: Run tests + run: pnpm test + + test_main_matrix: + name: Tests [Node ${{ matrix.node_version }}] + if: github.ref == 'refs/heads/main' + runs-on: ${{ matrix.os }} + strategy: + matrix: + node_version: ['18', '20', '22', '24'] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 + - name: Setup workspace + uses: ./.github/actions/setup-pnpm-node + with: + node-version: ${{ matrix.node_version }} + - name: Run tests run: pnpm test From f4b3b319c384ac711ed3e68eeefc727e4be76fe9 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Thu, 26 Feb 2026 13:57:59 +0100 Subject: [PATCH 2/3] fix: job naming --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0056755cc..e66c326ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ on: jobs: lint: - name: Lint (Node 24) + name: Lint runs-on: ubuntu-latest steps: @@ -26,7 +26,7 @@ jobs: run: pnpm lint:ci typecheck: - name: TypeScript (Node 24) + name: TypeScript runs-on: ubuntu-latest steps: @@ -40,7 +40,7 @@ jobs: run: pnpm typecheck test_pr: - name: Tests [Node 24] + name: Tests if: github.event_name == 'pull_request' runs-on: ubuntu-latest From 4fd1b8c1394fcb3d36ad96dd0fbf5109ccf531d8 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Thu, 26 Feb 2026 14:02:43 +0100 Subject: [PATCH 3/3] fix: naming + split matrix flow --- .github/workflows/test-main-matrix.yml | 27 ++++++++++++++++++++++++++ .github/workflows/test.yml | 21 +------------------- 2 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/test-main-matrix.yml diff --git a/.github/workflows/test-main-matrix.yml b/.github/workflows/test-main-matrix.yml new file mode 100644 index 000000000..2a3ddf9ec --- /dev/null +++ b/.github/workflows/test-main-matrix.yml @@ -0,0 +1,27 @@ +name: Test Main Matrix + +on: + push: + branches: [main] + paths-ignore: + - 'website/**' + workflow_dispatch: + +jobs: + test_main_matrix: + name: Tests [Node ${{ matrix.node_version }}] + runs-on: ${{ matrix.os }} + strategy: + matrix: + node_version: ['18', '20', '22', '24'] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 + - name: Setup workspace + uses: ./.github/actions/setup-pnpm-node + with: + node-version: ${{ matrix.node_version }} + + - name: Run tests + run: pnpm test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e66c326ee..32d0fcf46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test +name: CI Checks on: push: @@ -53,22 +53,3 @@ jobs: - name: Run tests run: pnpm test - - test_main_matrix: - name: Tests [Node ${{ matrix.node_version }}] - if: github.ref == 'refs/heads/main' - runs-on: ${{ matrix.os }} - strategy: - matrix: - node_version: ['18', '20', '22', '24'] - os: [ubuntu-latest] - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 - - name: Setup workspace - uses: ./.github/actions/setup-pnpm-node - with: - node-version: ${{ matrix.node_version }} - - - name: Run tests - run: pnpm test