File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,13 +15,16 @@ jobs:
1515 POSTGRES_PASSWORD : truthypwd
1616 ports :
1717 - 5432:5432
18+
1819 redis :
1920 image : redis
2021 options : >-
2122 --health-cmd "redis-cli ping"
2223 --health-interval 10s
2324 --health-timeout 5s
2425 --health-retries 5
26+ ports :
27+ - 6379:6379
2528
2629 steps :
2730 - uses : actions/checkout@v2
Original file line number Diff line number Diff line change @@ -114,27 +114,16 @@ export class AppFactory {
114114}
115115
116116const setupRedis = async ( ) => {
117- const redis = new Redis ( { } ) ;
117+ const redis = new Redis ( {
118+ host : process . env . REDIS_HOST || 'localhost' ,
119+ port : parseInt ( process . env . REDIS_PORT ) || 6379
120+ } ) ;
118121 await redis . flushall ( ) ;
119122 return redis ;
120123} ;
121124
122125const setupTestDatabase = async ( ) => {
123126 const database = `test_${ uuid4 ( ) } ` ;
124- console . log ( '🚀 ~ file: app.ts ~ line 124 ~ setupTestDatabase ~ database' , {
125- type : dbConfig . type ,
126- host : process . env . DB_HOST || dbConfig . host ,
127- port : parseInt ( process . env . DB_PORT ) || dbConfig . port ,
128- database : process . env . DB_DATABASE_NAME || dbConfig . database ,
129- username : process . env . DB_USERNAME || dbConfig . username ,
130- password : process . env . DB_PASSWORD || dbConfig . password ,
131- logging : false ,
132- synchronize : false ,
133- migrationsRun : true ,
134- migrationsTableName : 'migrations' ,
135- migrations : [ __dirname + '/../../src/database/migrations/**/*{.ts,.js}' ] ,
136- entities : [ __dirname + '/../../src/**/*.entity{.ts,.js}' ]
137- } ) ;
138127 const manager = new ConnectionManager ( ) . create ( {
139128 type : dbConfig . type ,
140129 host : process . env . DB_HOST || dbConfig . host ,
You can’t perform that action at this time.
0 commit comments