TL-M0-13 · CI on every pull request
Why: From here on, changes reach main only through pull requests. CI runs Biome, typecheck and build on the packages a change affects, and a separate workflow checks the pull request title against Conventional Commits (D6). The database and end-to-end jobs join later (TL-M0-18 and TL-M0-19).
ID TL-M0-13 · Level L0 · Run order row 13
Every pull request runs the checks and pr-title jobs, and both pass on the first one.
Before
Section titled “Before”TL-M0-12 is Done.
1 · A branch with the two workflows
Section titled “1 · A branch with the two workflows”git switch -c ci/checksmkdir -p .github/workflowscat > .github/workflows/ci.yml <<'EOF'name: CI
on: pull_request: push: branches: [main]
concurrency: group: ci-${{ github.ref }} cancel-in-progress: true
env: NEXT_TELEMETRY_DISABLED: 1 ASTRO_TELEMETRY_DISABLED: 1 TURBO_TELEMETRY_DISABLED: 1
jobs: checks: name: checks runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 with: fetch-depth: 0 - uses: pnpm/action-setup@v6 - uses: actions/setup-node@v7 with: node-version-file: .node-version cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm biome ci . - run: pnpm turbo run typecheck build ${{ github.event_name == 'pull_request' && '--affected' || '' }}EOFcat > .github/workflows/pr-title.yml <<'EOF'name: PR title
on: pull_request: types: [opened, edited, synchronize, reopened]
jobs: pr-title: name: pr-title runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: pnpm/action-setup@v6 - uses: actions/setup-node@v7 with: node-version-file: .node-version cache: pnpm - run: pnpm install --frozen-lockfile - name: Check the title against Conventional Commits (D6) env: PR_TITLE: ${{ github.event.pull_request.title }} run: echo "$PR_TITLE" | pnpm commitlintEOFgit add .githubgit commit -m "ci: run Biome, typecheck and build on pull requests"2 · Push, open the pull request, and watch the checks
Section titled “2 · Push, open the pull request, and watch the checks”git push -u origin ci/checksgh pr create --fillgh pr checks --watch3 · See the title check fail, then put the title back
Section titled “3 · See the title check fail, then put the title back”gh pr edit --title "added ci"sleep 15 && gh pr checks --watchgh pr edit --title "ci: run Biome, typecheck and build on pull requests"sleep 15 && gh pr checks --watch4 · Squash-merge and update main
Section titled “4 · Squash-merge and update main”gh pr merge --squash --delete-branchgit switch maingit pullExpect
Section titled “Expect”- Block 2: checks and pr-title pass. The first run takes a few minutes.
- Block 3: after the first edit, pr-title fails with “type may not be empty”; after the second it passes.
- Block 4: “✓ Squashed and merged pull request #1”.
gh run list --limit 4The runs for the pull request and the run on main after the merge show completed and success.
If it fails
Section titled “If it fails”- A job fails at pnpm install --frozen-lockfile: the lockfile on the branch is stale. Run pnpm install, commit pnpm-lock.yaml and push.
- Anything else: paste the output of gh run view --log-failed.
Before merging: gh pr close --delete-branch. After merging: revert it with a new pull request.
Done 2026-10-05 (zuki)