feat: Add CI configuration for backend tests
This commit is contained in:
@@ -2,9 +2,13 @@ import './check-env-file';
|
||||
import { createDatabaseAndUser } from '../../bin/database/utils';
|
||||
import { client as knex } from '../../src/config/database';
|
||||
import logger from '../../src/helpers/logger';
|
||||
import appConfig from '../../src/config/app';
|
||||
|
||||
const createAndMigrateDatabase = async () => {
|
||||
await createDatabaseAndUser();
|
||||
if (!appConfig.CI) {
|
||||
await createDatabaseAndUser();
|
||||
}
|
||||
|
||||
const migrator = knex.migrate;
|
||||
|
||||
await migrator.latest();
|
||||
|
Reference in New Issue
Block a user