ci: run server and client tests on PRs #1

Merged
w33ble merged 1 commit from ci/pr-tests into main 2026-09-02 11:07:38 -06:00
Collaborator

Adds a Forgejo Actions workflow (.forgejo/workflows/test.yml) that runs on new pull requests.

  • two parallel jobs on ubuntu-latest:
    • server: go test ./... -count=1 with Go version from server/go.mod
    • client: bun install --frozen-lockfile + bun run test
  • actions: checkout@v7, setup-go@v7 (from data.forgejo.org), oven-sh/setup-bun@v2
  • all uses: entries are fully-qualified URLs so it works regardless of DEFAULT_ACTIONS_URL config
Adds a Forgejo Actions workflow (`.forgejo/workflows/test.yml`) that runs on new pull requests. - two parallel jobs on `ubuntu-latest`: - **server**: `go test ./... -count=1` with Go version from `server/go.mod` - **client**: `bun install --frozen-lockfile` + `bun run test` - actions: `checkout@v7`, `setup-go@v7` (from data.forgejo.org), `oven-sh/setup-bun@v2` - all `uses:` entries are fully-qualified URLs so it works regardless of `DEFAULT_ACTIONS_URL` config
vitest under the bun runtime silently ran only the first test file
(vitest#10590); bun's native runner has no such gap. Since the repo is
bun-only (no node), drop vitest entirely:

- jsdom preload via bunfig.toml (client/test-setup.ts), mirroring the
  old vitest environment
- shared api mocks in src/test/apiMocks.ts; hook tests install them
  with mock.module before importing the hook
- explicit cleanup() in afterEach for RTL files (no auto-cleanup under
  bun), plus a synchronous notifyManager scheduler so query/mutation
  notifications land inside act
- test script split into two bun test invocations: the real-module api
  tests first, then everything else (one shared module registry per
  run, so mocks must not leak into api.test.ts)
- AGENTS.md test docs updated accordingly
ci: add Forgejo workflow to run server and client tests on PRs
All checks were successful
test / server (pull_request) Successful in 1m18s
test / client (pull_request) Successful in 30s
88724047c6
hijynx force-pushed ci/pr-tests from 88724047c6
All checks were successful
test / server (pull_request) Successful in 1m18s
test / client (pull_request) Successful in 30s
to c7dc42bec9
All checks were successful
test / client (pull_request) Successful in 25s
test / server (pull_request) Successful in 43s
2026-09-02 11:04:48 -06:00
Compare
w33ble approved these changes 2026-09-02 11:07:06 -06:00
w33ble merged commit c7dc42bec9 into main 2026-09-02 11:07:38 -06:00
w33ble deleted branch ci/pr-tests 2026-09-02 11:07:38 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
w33ble/pipit!1
No description provided.