Skip to content

Commit

Permalink
Merge branch 'master' into enabling-dialect-2-on-default
Browse files Browse the repository at this point in the history
  • Loading branch information
ofekshenawa authored Dec 19, 2024
2 parents 30b9d4d + 91dddc2 commit 5b4fe0a
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 3 deletions.
45 changes: 44 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,47 @@ jobs:
uses: codecov/codecov-action@v5
with:
files: coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}

test-redis-ce:
name: test-redis-ce
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
redis_version:
- "8.0-M01"
- "7.4.1"
- "7.2.6"
- "6.2.16"
go-version:
- "1.19.x"
- "1.20.x"
- "1.21.x"

steps:
- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4

# Set up Docker Compose environment
- name: Set up Docker Compose environment
run: |
docker compose --profile all up -d
- name: Run tests
env:
USE_CONTAINERIZED_REDIS: "true"
RE_CLUSTER: "true"
run: |
go test \
--ginkgo.skip-file="ring_test.go" \
--ginkgo.skip-file="sentinel_test.go" \
--ginkgo.skip-file="osscluster_test.go" \
--ginkgo.skip-file="pubsub_test.go" \
--ginkgo.skip-file="gears_commands_test.go" \
--ginkgo.label-filter='!NonRedisEnterprise'
1 change: 1 addition & 0 deletions .github/workflows/test-redis-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- name: Test
env:
RE_CLUSTER: "1"
USE_CONTAINERIZED_REDIS: "1"
run: |
go test \
--ginkgo.skip-file="ring_test.go" \
Expand Down
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---

services:

redis-stanalone:
image: redislabs/client-libs-test:8.0-M02
container_name: redis-standalone
environment:
- REDIS_CLUSTER=no
- PORT=6379
- TLS_PORT=6666
command: --loadmodule /usr/local/lib/redis/modules/redisbloom.so --loadmodule /usr/local/lib/redis/modules/redisearch.so --loadmodule /usr/local/lib/redis/modules/redistimeseries.so --loadmodule /usr/local/lib/redis/modules/rejson.so
ports:
- 6379:6379
- 6380:6379
- 6666:6666 # TLS port
volumes:
- "./dockers/redis-standalone:/redis/work"
profiles:
- standalone
- all
5 changes: 3 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ var cluster = &clusterScenario{
}

var RECluster = false
var USE_CONTAINERIZED_REDIS = false

func registerProcess(port string, p *redisProcess) {
if processes == nil {
Expand All @@ -82,8 +83,8 @@ var _ = BeforeSuite(func() {
}
var err error
RECluster, _ = strconv.ParseBool(os.Getenv("RE_CLUSTER"))

if !RECluster {
USE_CONTAINERIZED_REDIS, _ = strconv.ParseBool(os.Getenv("USE_CONTAINERIZED_REDIS"))
if !RECluster || !USE_CONTAINERIZED_REDIS {

redisMain, err = startRedis(redisPort)
Expect(err).NotTo(HaveOccurred())
Expand Down

0 comments on commit 5b4fe0a

Please sign in to comment.