Skip to content

created job for migrating db and setting empty db #57

created job for migrating db and setting empty db

created job for migrating db and setting empty db #57

Workflow file for this run

on:
push:
branches:
- main
- dev
jobs:
# services:
# postgres:
# image: postgres:latest
# ports:
# - 5432:5432
# env:
# POSTGRES_DB: testdb
# POSTGRES_USER: testuser
# POSTGRES_PASSWORD: testpassword
# options: >-
# --health-cmd="pg_isready -U $${POSTGRES_USER}"
# --health-interval=10s
# --health-timeout=5s
# --health-retries=5
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
#
- name: Install dependencies
run: npm install
- name: Run unit tests
run: npm run test
- name: Run database migrations
run: npm run migrations
- name: Run e2e tests
run: npm run test:e2e
env:
DATABASE_URL: postgres://testuser:testpassword@localhost:5432/testdb