manicanldes-backend/.gitea/workflows/backend.yml

54 lines
1.9 KiB
YAML

name: Backend quality
on:
push:
branches: [main, 'feat/**', 'fix/**']
pull_request:
branches: [main]
jobs:
quality:
runs-on: ubuntu-latest
container: node:24.15-bookworm
timeout-minutes: 30
env:
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/postgres
TEST_DATABASE_URL: ''
steps:
- uses: https://github.com/actions/checkout@v4
- name: Install locked dependencies
run: npm install --global pnpm@11.19.0 && pnpm install --frozen-lockfile
- name: Audit production dependencies
run: pnpm security:audit
- name: Generate Prisma client
run: pnpm db:generate
- name: Validate embedded migration upgrade and schema drift
run: pnpm db:test
- name: Formatting, types, tooling, coverage and build
run: pnpm check
native-postgres:
runs-on: ubuntu-latest
container: node:24.15-bookworm
timeout-minutes: 15
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: mani
POSTGRES_PASSWORD: ${{ secrets.CI_POSTGRES_PASSWORD }}
POSTGRES_DB: mani_ci
options: >-
--health-cmd "pg_isready -U mani -d mani_ci"
--health-interval 5s --health-timeout 5s --health-retries 10
env:
DATABASE_URL: postgresql://mani:${{ secrets.CI_POSTGRES_PASSWORD }}@postgres:5432/mani_ci
TEST_DATABASE_URL: postgresql://mani:${{ secrets.CI_POSTGRES_PASSWORD }}@postgres:5432/mani_ci
steps:
- uses: https://github.com/actions/checkout@v4
- name: Install locked dependencies
run: npm install --global pnpm@11.19.0 && pnpm install --frozen-lockfile
- name: Generate Prisma client
run: pnpm db:generate
- name: Validate native migration upgrade and schema drift
run: node scripts/verify-migrations.mjs
- name: Require native concurrency tests without skips
run: pnpm test:native