diff --git a/.github/workflows/fork-patches.yml b/.github/workflows/fork-patches.yml new file mode 100644 index 000000000000..a3927a374b87 --- /dev/null +++ b/.github/workflows/fork-patches.yml @@ -0,0 +1,100 @@ +name: Fork Patches CI + +# CI for the fork-patches integration branch. +# +# Why this exists (FLO-520): pr.yml only triggers on pull_request -> master, and a +# fork-patches -> master PR spans ~300 commits and carries pnpm-lock.yaml changes, so the +# pr.yml `policy` job's manual-lockfile-edit guard fails and every job that needs:[policy] +# (including the DB-backed serialized server suite) is skipped. As a result, patches landing +# on fork-patches got no CI at all. This workflow gives fork-patches its own minimal, +# self-contained lane: full typecheck + the embedded-postgres serialized server tests, on +# x86 GitHub-hosted runners (the maintainer works on ARM, so these can't be run locally). +# +# It deliberately does NOT re-run the pr.yml policy/lockfile-guard machinery: the committed +# pnpm-lock.yaml is authoritative on fork-patches, and `--frozen-lockfile` here doubles as a +# lockfile-consistency check. + +on: + push: + branches: + - fork-patches + pull_request: + branches: + - fork-patches + +concurrency: + group: fork-patches-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + typecheck: + name: Typecheck + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Setup pnpm + uses: pnpm/action-setup@v6 + with: + version: 9.15.4 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Typecheck + run: pnpm run typecheck + + serialized_server: + name: Serialized server tests (${{ matrix.shard_label }}) + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + strategy: + fail-fast: false + matrix: + include: + - shard_index: 0 + shard_count: 4 + shard_label: 1/4 + - shard_index: 1 + shard_count: 4 + shard_label: 2/4 + - shard_index: 2 + shard_count: 4 + shard_label: 3/4 + - shard_index: 3 + shard_count: 4 + shard_label: 4/4 + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Setup pnpm + uses: pnpm/action-setup@v6 + with: + version: 9.15.4 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run serialized server test shard + run: pnpm test:run:serialized -- --shard-index ${{ matrix.shard_index }} --shard-count ${{ matrix.shard_count }}