Skip to content

fix: many misc things #27

fix: many misc things

fix: many misc things #27

name: Test (Integration)
on:
pull_request:
types: [synchronize, opened, reopened]
push:
branches:
- main
- production
permissions:
contents: read
jobs:
integration-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: sweetr_test
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 2s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5433/sweetr_test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run Integration Tests
run: npm run test:integration
working-directory: apps/api
env:
DATABASE_URL: ${{ env.DATABASE_URL }}