Skip to content

added docker

added docker #60

Workflow file for this run

on:
push:
branches:
- main
- dev
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
container:
image: docker:latest
options: --privileged
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
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