Skip to content

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.

TL-M0-12 is Done.

Terminal window
git switch -c ci/checks
mkdir -p .github/workflows
cat > .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' || '' }}
EOF
cat > .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 commitlint
EOF
git add .github
git 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”
Terminal window
git push -u origin ci/checks
gh pr create --fill
gh pr checks --watch

3 · See the title check fail, then put the title back

Section titled “3 · See the title check fail, then put the title back”
Terminal window
gh pr edit --title "added ci"
sleep 15 && gh pr checks --watch
gh pr edit --title "ci: run Biome, typecheck and build on pull requests"
sleep 15 && gh pr checks --watch
Terminal window
gh pr merge --squash --delete-branch
git switch main
git pull
  • 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”.
Terminal window
gh run list --limit 4

The runs for the pull request and the run on main after the merge show completed and success.

  • 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)