Skip to content

Commit 4a54c4b

Browse files
authored
Merge branch 'redis:master' into test-binary-package
2 parents 2069211 + 2ec5430 commit 4a54c4b

34 files changed

+331
-239
lines changed

.github/workflows/integration.yml

+55-7
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,62 @@ concurrency:
1616
cancel-in-progress: true
1717

1818
jobs:
19+
enterprise-tests:
20+
name: Redis Enterprise
21+
runs-on: ubuntu-latest
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
enterprise_version: ['7.2.4-92']
27+
env_file_mode: ['enterprise', 'enterprise_oss_cluster']
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Load dotnenv for CI
33+
uses: xom9ikk/dotenv@v2
34+
with:
35+
path: .github/workflows/modes
36+
mode: ${{ matrix.env_file_mode }}
37+
38+
- name: Clone ee docker code
39+
uses: actions/checkout@v4
40+
with:
41+
repository: redislabs/redis-ee-docker
42+
path: redis-ee-docker
43+
44+
45+
- name: Start docker
46+
working-directory: redis-ee-docker
47+
env:
48+
IMAGE: redislabs/redis-internal:${{ matrix.enterprise_version }}
49+
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
50+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
51+
run: ./build.sh
52+
53+
- name: .NET Core 8
54+
uses: actions/setup-dotnet@v2
55+
56+
with:
57+
dotnet-version: '8.0.x'
58+
- name: Restore dependencies
59+
run: dotnet restore
60+
61+
- name: Build
62+
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
63+
64+
- name: Test
65+
run: dotnet test -f net8.0 --no-build --verbosity detailed
66+
1967
dotnet_6_cluster:
2068
name: .NET 6 on [redis-stack cluster]
2169
uses: ./.github/workflows/reusable.yml
2270
with:
2371
redis_stack_type: cluster
2472
clr_version: net6.0
73+
mode: oss_cluster
2574
dotnet_sdk_version: 6.0.0
26-
dotenv_file: .github/cluster.env
2775
secrets: inherit
2876

2977
dotnet_6:
@@ -37,8 +85,8 @@ jobs:
3785
with:
3886
redis_stack_type: ${{matrix.redis-stack-type}}
3987
clr_version: net6.0
88+
mode: standalone
4089
dotnet_sdk_version: 6.0.0
41-
dotenv_file: .github/standalone.env
4290
secrets: inherit
4391

4492
dotnet_7_cluster:
@@ -47,8 +95,8 @@ jobs:
4795
with:
4896
redis_stack_type: cluster
4997
clr_version: net7.0
98+
mode: oss_cluster
5099
dotnet_sdk_version: 7.0.0
51-
dotenv_file: .github/cluster.env
52100
secrets: inherit
53101

54102
dotnet_7:
@@ -62,8 +110,8 @@ jobs:
62110
with:
63111
redis_stack_type: ${{matrix.redis-stack-type}}
64112
clr_version: net7.0
113+
mode: standalone
65114
dotnet_sdk_version: 7.0.0
66-
dotenv_file: .github/standalone.env
67115
secrets: inherit
68116

69117
dotnet_8_cluster:
@@ -72,8 +120,8 @@ jobs:
72120
with:
73121
redis_stack_type: cluster
74122
clr_version: net8.0
123+
mode: oss_cluster
75124
dotnet_sdk_version: 8.0.0
76-
dotenv_file: .github/cluster.env
77125
secrets: inherit
78126

79127
dotnet_8:
@@ -87,8 +135,8 @@ jobs:
87135
with:
88136
redis_stack_type: ${{matrix.redis-stack-type}}
89137
clr_version: net8.0
138+
mode: standalone
90139
dotnet_sdk_version: 8.0.0
91-
dotenv_file: .github/standalone.env
92140
secrets: inherit
93141

94142
build_and_test_windows:
@@ -130,4 +178,4 @@ jobs:
130178
shell: cmd
131179
run: |
132180
START wsl ./redis-stack-server-${{env.redis_stack_version}}/bin/redis-stack-server &
133-
dotnet test -f net481 --no-build --verbosity normal
181+
dotnet test -f net481 --no-build --verbosity detailed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
REDIS=127.0.0.1:6379
2+
IS_ENTERPRISE=true
3+
4+
RE_PASS=12345
5+
RE_CLUSTER_NAME=test
6+
RE_USE_OSS_CLUSTER=false
7+
RE_DB_PORT=6379
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
REDIS_CLUSTER=127.0.0.1:6372
2+
NUM_REDIS_CLUSTER_NODES=3
3+
IS_ENTERPRISE=true
4+
5+
RE_PASS=12345
6+
RE_CLUSTER_NAME=test
7+
RE_USE_OSS_CLUSTER=true
8+
RE_DB_PORT=6378
File renamed without changes.
File renamed without changes.

.github/workflows/reusable.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
required: true
2020
type: string
2121

22-
dotenv_file:
22+
mode:
2323
required: true
2424
type: string
2525
jobs:
@@ -39,14 +39,15 @@ jobs:
3939
with:
4040
dotnet-version: 8
4141

42-
- name: run redis-stack-server docker
42+
- name: Run redis-stack-server docker
4343
working-directory: .github
4444
run: docker-compose up -d redis-stack-${{inputs.redis_stack_type}}
4545

46-
- name: set variables in dotenv
47-
uses: c-py/action-dotenv-to-setenv@v2
46+
- name: Set .env variables
47+
uses: xom9ikk/dotenv@v2
4848
with:
49-
env-file: ${{inputs.dotenv_file}}
49+
path: .github/workflows/modes
50+
mode: ${{ inputs.mode }}
5051

5152
# Make sure only the desired dotnet version is set both as target and as active SDK.
5253
- name: Tweak target frameworks

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,4 @@ tests/NRedisStack.Tests/redis_credentials/redis_user.crt
408408

409409
# global.json
410410
global.json
411+
tests/NRedisStack.Tests/lcov.net8.0.info

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ dotnet test --environment="REDIS=<redisServer:port>"
110110
```
111111
e.g:
112112
```bash
113-
dotnet test --environment="REDIS=172.17.0.1:6379"
113+
dotnet test --environment="REDIS=127.17.0.1:6379"
114114
```
115115

116116
To run your tests against an oss cluster:

0 commit comments

Comments
 (0)