ci: gate PRs into main on server tests + client build #57

Merged
whitlocktech merged 1 commits from ci/pr-checks into main 2026-07-12 15:40:19 +00:00
Member

What

Adds .gitea/workflows/pr-checks.yml — a check suite that runs on every pull request into main, so a failing test or broken build can't reach the deployable branch. Complements build-images.yml (which runs after merge to publish images).

Jobs (parallel, on the existing ubuntu-latest runner)

Job Runs Notes
server-tests npm ci + npm test (node --test) 164 tests, no DB needed — the suite stubs models and points the pool at a dead port
client-build npm ci + vite build
bot-install npm ci no tests/build to run; catches a broken/stale lockfile before it ships in the bot image

No lint step — there's no ESLint in the repo yet. These jobs need only Node (no Docker socket).

Enabling enforcement (one-time, after this run goes green)

Repository Settings → Branches → Branch Protection (rule for main):

  • Enable Status Check
  • Status check patterns:
    PR Checks / *
    

Gitea only lists a context in its dropdown after it has reported once — this PR is that first run. The PR Checks / * glob matches all three jobs (and any added later) without needing the dropdown.

Exact contexts, if you prefer to pin them:

PR Checks / server-tests (pull_request)
PR Checks / client-build (pull_request)
PR Checks / bot-install (pull_request)

🤖 Generated with Claude Code

https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ

## What Adds `.gitea/workflows/pr-checks.yml` — a check suite that runs on every **pull request into `main`**, so a failing test or broken build can't reach the deployable branch. Complements `build-images.yml` (which runs *after* merge to publish images). ## Jobs (parallel, on the existing `ubuntu-latest` runner) | Job | Runs | Notes | |---|---|---| | `server-tests` | `npm ci` + `npm test` (`node --test`) | 164 tests, **no DB needed** — the suite stubs models and points the pool at a dead port | | `client-build` | `npm ci` + `vite build` | | | `bot-install` | `npm ci` | no tests/build to run; catches a broken/stale lockfile before it ships in the bot image | No lint step — there's no ESLint in the repo yet. These jobs need only Node (no Docker socket). ## Enabling enforcement (one-time, after this run goes green) **Repository Settings → Branches → Branch Protection** (rule for `main`): - ✅ **Enable Status Check** - **Status check patterns:** ``` PR Checks / * ``` Gitea only lists a context in its dropdown after it has reported once — this PR is that first run. The `PR Checks / *` glob matches all three jobs (and any added later) without needing the dropdown. Exact contexts, if you prefer to pin them: ``` PR Checks / server-tests (pull_request) PR Checks / client-build (pull_request) PR Checks / bot-install (pull_request) ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
wtclaude added 1 commit 2026-07-12 15:07:42 +00:00
ci: gate PRs into main on server tests + client build
All checks were successful
PR Checks / server-tests (pull_request) Successful in 11m35s
PR Checks / client-build (pull_request) Successful in 9m42s
PR Checks / bot-install (pull_request) Successful in 9m34s
34c511c8d0
Add .gitea/workflows/pr-checks.yml running on pull_request into main.
Three parallel jobs on the existing ubuntu-latest runner:

  • server-tests  — npm ci + node --test (164 tests, no DB needed:
    the suite stubs models and points the pool at a dead port)
  • client-build  — npm ci + vite build
  • bot-install   — npm ci only (catches a broken/stale lockfile)

No ESLint exists in the repo yet, so no lint step. Complements
build-images.yml, which publishes images post-merge.

Enable in Branch Protection with status check pattern: PR Checks / *

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
whitlocktech approved these changes 2026-07-12 15:39:50 +00:00
whitlocktech merged commit 2dc360ca48 into main 2026-07-12 15:40:19 +00:00
whitlocktech deleted branch ci/pr-checks 2026-07-12 15:40:19 +00:00
Sign in to join this conversation.
No description provided.