53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
# Gitea Actions (same syntax as GitHub Actions). Runs on the self-hosted forge
|
|
# runner; no external provider. The check job covers the SQL layer through the
|
|
# PGlite harness (no Docker); the supabase job replays it on the real stack.
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Activate pnpm (version from package.json "packageManager")
|
|
run: corepack enable && corepack prepare --activate
|
|
- run: pnpm install --frozen-lockfile
|
|
- run: pnpm typecheck
|
|
- run: pnpm test:run
|
|
- run: pnpm lint
|
|
- run: pnpm build
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Docker image builds (runner needs a Docker daemon)
|
|
run: docker build -t faunosteo:ci .
|
|
|
|
supabase:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- run: corepack enable && corepack prepare --activate
|
|
- run: pnpm install --frozen-lockfile
|
|
- name: Start the local stack (runner needs a Docker daemon); applies migrations + seed
|
|
run: pnpm supabase start
|
|
- name: pgTAP on the real PostgreSQL image
|
|
run: pnpm db:test
|
|
- name: Generated types match the schema
|
|
run: pnpm db:types:check
|
|
- if: always()
|
|
run: pnpm supabase stop --no-backup
|