Add Redis in test

This commit is contained in:
Hongbo Wu
2022-10-11 19:10:42 +08:00
parent 2ba9247a98
commit d74eee131c
2 changed files with 8 additions and 0 deletions

View File

@ -42,6 +42,10 @@ jobs:
--health-retries 10
ports:
- 9200
redis:
image: "redis:6.2.7"
ports:
- 6379
steps:
- uses: actions/checkout@v2
with:

View File

@ -1,6 +1,7 @@
import { createTestConnection } from './db'
import { initElasticsearch } from '../src/elastic'
import { startApolloServer } from './util'
import { connectRedisClient } from '../src/utils/redis'
export const mochaGlobalSetup = async () => {
await createTestConnection()
@ -9,6 +10,9 @@ export const mochaGlobalSetup = async () => {
await initElasticsearch()
console.log('elasticsearch initialized')
await connectRedisClient()
console.log('redis client connected')
await startApolloServer()
console.log('apollo server started')
}