Skip to content

Enforce tests pass on committed files #18

Enforce tests pass on committed files

Enforce tests pass on committed files #18

name: run-server-tests
run-name: Enforce tests pass on committed files
on:
workflow_dispatch:
pull_request:
jobs:
run-server-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: cyf
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- run: cp .env.example .env
- run: npm install
- run: npm run test:server
env:
TEST_DATABASE_URL: postgres://cyf:password@localhost:5432/cyf