mirror of https://github.com/go-redis/redis.git
Add docker compose file
This commit is contained in:
parent
1dcda5e6a6
commit
e4f26476a8
|
@ -72,9 +72,12 @@ jobs:
|
|||
# Set up Docker Compose environment
|
||||
- name: Set up Docker Compose environment
|
||||
run: |
|
||||
docker compose -f src/test/resources/env/docker-compose.yml up -d
|
||||
docker compose --profile all up -d --build
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
USE_PREBUILT_REDIS: "true"
|
||||
RE_CLUSTER: "true"
|
||||
run: |
|
||||
go test \
|
||||
--ginkgo.skip-file="ring_test.go" \
|
||||
|
@ -82,3 +85,4 @@ jobs:
|
|||
--ginkgo.skip-file="osscluster_test.go" \
|
||||
--ginkgo.skip-file="pubsub_test.go" \
|
||||
--ginkgo.skip-file="gears_commands_test.go" \
|
||||
--ginkgo.label-filter='!NonRedisEnterprise'
|
|
@ -3,14 +3,13 @@
|
|||
services:
|
||||
|
||||
redis:
|
||||
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:8.0-M01}
|
||||
image: redislabs/client-libs-test:8.0-M01
|
||||
container_name: redis-standalone
|
||||
environment:
|
||||
- TLS_ENABLED=yes
|
||||
- REDIS_CLUSTER=no
|
||||
- PORT=6379
|
||||
- TLS_PORT=6666
|
||||
command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --tls-auth-clients optional --save ""}
|
||||
command: --enable-module-command yes
|
||||
ports:
|
||||
- 6379:6379
|
||||
- 6380:6379
|
|
@ -66,6 +66,7 @@ var cluster = &clusterScenario{
|
|||
}
|
||||
|
||||
var RECluster = false
|
||||
var USE_PREBUILT_REDIS = false
|
||||
|
||||
func registerProcess(port string, p *redisProcess) {
|
||||
if processes == nil {
|
||||
|
@ -82,8 +83,9 @@ var _ = BeforeSuite(func() {
|
|||
}
|
||||
var err error
|
||||
RECluster, _ = strconv.ParseBool(os.Getenv("RE_CLUSTER"))
|
||||
|
||||
if !RECluster {
|
||||
USE_PREBUILT_REDIS, _ = strconv.ParseBool(os.Getenv("USE_PREBUILT_REDIS"))
|
||||
// panic("RECluster: " + strconv.FormatBool(RECluster) + " USE_PREBUILT_REDIS: " + strconv.FormatBool(USE_PREBUILT_REDIS))
|
||||
if !RECluster || !USE_PREBUILT_REDIS {
|
||||
|
||||
redisMain, err = startRedis(redisPort)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
|
Loading…
Reference in New Issue