From e1f7ee8f6e9e1abe2c09717c2e879bdb1a9d3075 Mon Sep 17 00:00:00 2001 From: Alex Yates <43525405+yatesjalex@users.noreply.github.com> Date: Wed, 22 Apr 2026 22:04:19 -0700 Subject: [PATCH] Split CI into four parallel jobs for faster feedback Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 97 +++++++++++++++++++++++++++++++++------- 1 file changed, 81 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0389fd..2fde0d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,54 +9,119 @@ concurrency: group: ci-${{ github.ref }} cancel-in-progress: true +defaults: + run: + shell: bash + +# Shared setup steps are duplicated across jobs intentionally — GitHub Actions +# has no native "shared setup" primitive, and the pnpm cache makes installs fast. + jobs: - check: - name: typecheck / test / build / playwright + typecheck: + name: typecheck runs-on: ubuntu-latest - timeout-minutes: 15 - env: - ANTHROPIC_API_KEY: '' - + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 with: node-version: 20 - - name: Enable pnpm via corepack run: corepack enable - - name: Resolve pnpm store path id: pnpm-store run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" - - name: Cache pnpm store uses: actions/cache@v4 with: path: ${{ steps.pnpm-store.outputs.path }} key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- - + restore-keys: ${{ runner.os }}-pnpm- - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Typecheck run: pnpm typecheck + test: + name: test + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Enable pnpm via corepack + run: corepack enable + - name: Resolve pnpm store path + id: pnpm-store + run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: ${{ runner.os }}-pnpm- + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Unit tests run: pnpm test + build: + name: build + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + ANTHROPIC_API_KEY: '' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Enable pnpm via corepack + run: corepack enable + - name: Resolve pnpm store path + id: pnpm-store + run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: ${{ runner.os }}-pnpm- + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Build run: pnpm build + playwright: + name: playwright + runs-on: ubuntu-latest + timeout-minutes: 15 + env: + ANTHROPIC_API_KEY: '' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Enable pnpm via corepack + run: corepack enable + - name: Resolve pnpm store path + id: pnpm-store + run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: ${{ runner.os }}-pnpm- + - name: Install dependencies + run: pnpm install --frozen-lockfile - name: Install Playwright browsers run: pnpm exec playwright install --with-deps chromium - - name: Playwright tests run: pnpm exec playwright test - - name: Upload Playwright traces on failure if: failure() uses: actions/upload-artifact@v4