Appearance
CI/CD
Forgejo Actions workflow at .forgejo/workflows/ci.yml. Runs on push to main and PRs to main.
Jobs
1. check
Code quality gate — runs on every trigger.
- Install Node.js and pnpm
- Install dependencies (
pnpm install) - Generate TypeScript types (
api#prepare+web#prepare) - Run
pnpm run check(format + lint + typecheck)
2. test
Unit tests — runs on every trigger.
- Run monorepo tests (
pnpm run test) - Run API server tests
- Upload JUnit XML reports
3. e2e
End-to-end tests — depends on check passing.
Services: PostgreSQL 17 + Redis 7 (inline service containers).
| Trigger | Tests Run |
|---|---|
| PR | @smoke only (fast feedback) |
| Push to main | Full suite |
Artifacts on failure:
- Playwright HTML report
- Test results (screenshots, videos, traces)
PR integration:
- Test results posted as PR comment via Forgejo API
4. deploy-docs
Deploys VitePress documentation to Cloudflare Pages — runs on push to main only, depends on check passing.
- Build docs (
pnpm run build:docs, which also builds the API for the OpenAPI spec) - Deploy
docs/.vitepress/distviawrangler pages deploy
Secrets required: CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN
Environment Variables (CI)
NITRO_DATABASE_URL=postgresql://libris_test:libris_test@postgres:5432/libris_test
NITRO_REDIS_URL=redis://redis:6379
NITRO_INBOX_PATH=/tmp/e2e-inbox
NITRO_LIBRARY_PATH=/tmp/e2e-library
NITRO_API_SECRET_KEY=ci-e2e-test-secret-key-minimum-32-chars!
NUXT_SESSION_PASSWORD=ci-e2e-test-session-secret-32-chars-min
NUXT_API_BASE_URL=http://localhost:3000Publish Images
Manual workflow at .forgejo/workflows/publish-images.yml. Builds and pushes Docker images to the Forgejo container registry.
Trigger: workflow_dispatch (run from Forgejo UI: Actions > Publish Images > Run workflow)
Jobs:
- version — Runs
changeset versionto bump package versions and update changelogs. Creates git tags (api/v<version>,web/v<version>) and Forgejo releases with changelogs. - build — Builds and pushes Docker images.
Images produced:
git.lan.raz.wtf/raz/libris/api:v<version>+latestgit.lan.raz.wtf/raz/libris/web:v<version>+latest
See docs/deployment.md for production usage.
Docker Test Services
docker-compose.test.yml for local testing:
| Service | Port | Config |
|---|---|---|
| PostgreSQL 17 | 5433 | DB: libris_test, tmpfs storage |
| Redis 7 | 6380 | tmpfs storage |
Both use tmpfs for fast ephemeral storage.