mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 22:17:14 +03:00
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:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user