33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
name: Torob regression
|
|
on:
|
|
push:
|
|
branches: [develop, main]
|
|
pull_request:
|
|
branches: [develop, main]
|
|
jobs:
|
|
torob-regression:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
torob-test-db:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_USER: torob
|
|
POSTGRES_PASSWORD: disposable-fixture-only
|
|
POSTGRES_DB: torob_test
|
|
options: >-
|
|
--health-cmd "pg_isready -U torob -d torob_test"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 10
|
|
container: node:20
|
|
env:
|
|
DATABASE_URL: postgresql://torob:disposable-fixture-only@torob-test-db:5432/torob_test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install and generate isolated client
|
|
run: cd backend && npm ci && npx prisma generate
|
|
- name: Unit regressions
|
|
run: cd backend && npm test -- --runInBand src/products/torob.controller.spec.ts
|
|
- name: Disposable PostgreSQL integration
|
|
run: cd backend && npx prisma db push --skip-generate && npx jest --config test/jest-torob.json --runInBand
|