Add Redis in test
This commit is contained in:
4
.github/workflows/run-tests.yaml
vendored
4
.github/workflows/run-tests.yaml
vendored
@ -42,6 +42,10 @@ jobs:
|
||||
--health-retries 10
|
||||
ports:
|
||||
- 9200
|
||||
redis:
|
||||
image: "redis:6.2.7"
|
||||
ports:
|
||||
- 6379
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
||||
@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user