Skip to content

chore: replace real Supabase project ref with placeholders in .env.ex… #11

chore: replace real Supabase project ref with placeholders in .env.ex…

chore: replace real Supabase project ref with placeholders in .env.ex… #11

Workflow file for this run

name: Backend CI
on:
pull_request:
paths:
- "backend/**"
- ".github/workflows/backend.yml"
push:
branches:
- main
paths:
- "backend/**"
- ".github/workflows/backend.yml"
jobs:
backend:
name: Backend checks (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]
defaults:
run:
working-directory: backend
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: novasupport_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d novasupport_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/novasupport_test
DIRECT_URL: postgresql://postgres:postgres@127.0.0.1:5432/novasupport_test
NODE_ENV: test
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: backend/package-lock.json
- name: Install backend dependencies
run: npm ci
- name: Generate Prisma client
run: npm run db:generate
- name: Apply database migrations
run: npm run db:migrate:deploy
- name: Run backend tests
run: npm run test
- name: Build backend
run: npm run build