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

View File

@@ -2,7 +2,9 @@ import fs from 'fs';
import {SBSConfig} from "./types/config.model";
const isTestMode = process.env.npm_lifecycle_script === 'ts-node test/test.ts';
const configFile = isTestMode ? 'test.json' : 'config.json';
const configFile = process.env.TEST_POSTGRES ? 'ci.json'
: isTestMode ? 'test.json'
: 'config.json';
export const config: SBSConfig = JSON.parse(fs.readFileSync(configFile).toString('utf8'));
addDefaults(config, {