Skip to content

github workflow to run tests on push #1

github workflow to run tests on push

github workflow to run tests on push #1

Workflow file for this run

name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# See https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers#running-jobs-directly-on-the-runner-machine
services:
postgres:
# Docker Hub image
image: postgres
env:
POSTGRES_PASSWORD: S3cret
POSTGRES_USER: user
POSTGRES_DB: authorization_db
# 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:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Setup env
run: cp .env.example .env
- name: Run migrations and populate with dummy data
run: npm run dev-db
- name: Run integration tests
run: npm t