Skip to content

1.11.1-7-g2cc5ce3

1.11.1-7-g2cc5ce3 #729

Workflow file for this run

name: run-tests
on: [push]
jobs:
run-api-tests:
runs-on: ubuntu-latest
services:
redis:
image: redis:6-alpine
ports:
- 6379:6379
postgres:
image: postgres:12-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: api
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup env file
run: cp .env.example .env
- run: npm run db:migrate
- run: npm run db:seed
- run: npm run test