set up postgres CI route

uses env flag TEST_POSTGRES since the sqlite test also runs with env flag CI true
This commit is contained in:
Michael C
2021-06-23 14:48:47 -04:00
parent 746dc4f81d
commit da92f2082d
5 changed files with 110 additions and 1 deletions

27
.github/workflows/postgres-ci.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Docker Image CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the docker-compose stack
env:
PG_USER: ci_db_user
PG_PASS: ci_db_pass
run: docker-compose up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
time: '10s'
- name: Check running containers
run: docker ps
- uses: actions/setup-node@v1
- run: npm install
- name: Run test suite
env:
TEST_POSTGRES: true
run: npm test