Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing against Redis Enterprise in CI #229

Merged
merged 46 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
aca6f28
NRedisStack Enterprise Test
shacharPash Dec 20, 2023
83c750a
enters
shacharPash Dec 20, 2023
2a263e1
try to change the image
shacharPash Dec 20, 2023
a8f55e3
update the image as it was before
shacharPash Dec 20, 2023
aa73521
add --environment="NUM_REDIS_CLUSTER_NODES=6" to dotnet test
shacharPash Dec 21, 2023
41a4c59
change to 127
shacharPash Dec 21, 2023
be4dc04
skip if enterprise - start
shacharPash Dec 25, 2023
276e2ee
change IS_REDIS_ENTERPRISE: 'true' location
shacharPash Dec 25, 2023
2ef64b2
skip gears in enterprise
shacharPash Dec 25, 2023
940cc8c
skip tests with ft.config
shacharPash Dec 25, 2023
5fb1b18
dont send REDISGEARS_2.REFRESHCLUSTER if enterprise
shacharPash Dec 25, 2023
158019d
skip unknown command test
shacharPash Dec 25, 2023
08b87bf
chayim
shacharPash Dec 25, 2023
de17cab
add oss-cluetr as another job
shacharPash Dec 26, 2023
32a9d18
try add standalone host+port at the start of endpoints
shacharPash Dec 26, 2023
11a3c45
fix dotnet test and change the nodes to 3
shacharPash Dec 26, 2023
09569c5
start skipping
shacharPash Dec 28, 2023
766a44c
try chayim changes
shacharPash Dec 28, 2023
7cafee3
cahange 100.0.1-64402 to 7.2.4-92 + skip + return to previus env names
shacharPash Dec 28, 2023
4b515b4
skips
shacharPash Dec 28, 2023
9d1599c
print the info
shacharPash Dec 28, 2023
3231fa0
skip setinfo in enterprise
shacharPash Dec 28, 2023
8aba164
change verbosity to detailed
shacharPash Dec 28, 2023
a1fa590
dotnet format
shacharPash Dec 31, 2023
dc82107
use .env file
shacharPash Dec 31, 2023
0fa434f
checkout
shacharPash Dec 31, 2023
90961dd
chanfe : to =
shacharPash Dec 31, 2023
a82a5a3
change to chayims method
shacharPash Dec 31, 2023
be41223
add IS_ENTERPRISE=true
shacharPash Dec 31, 2023
279a9fd
use matrix to run both tests
shacharPash Dec 31, 2023
0843687
add ' '
shacharPash Dec 31, 2023
c3cec6c
use xom9ikk/dotenv@v2 in reusable
shacharPash Dec 31, 2023
ccf8f8b
fix path
shacharPash Dec 31, 2023
83cd939
delete IMAGE from .env
shacharPash Dec 31, 2023
40e8c8c
add OSS_CLUSTER to the .env's
shacharPash Dec 31, 2023
1badfed
skip if oss cluster
shacharPash Dec 31, 2023
76f2558
skip oss cluster
shacharPash Dec 31, 2023
f352c80
update var names
shacharPash Jan 2, 2024
b35ec21
Merge branch 'master' into TestOnEnterprise
shacharPash Jan 18, 2024
3ebd238
Merge branch 'master' into TestOnEnterprise
shacharPash Feb 22, 2024
0117091
fix integrations
shacharPash Feb 22, 2024
713ffa3
change to .net 8
shacharPash Feb 25, 2024
8d2ddbf
add lcov to gitignor
shacharPash Feb 25, 2024
7f3b13d
Skip tests if enterprise
shacharPash Feb 25, 2024
1ded97b
skip TestBLMPop if enterprise
shacharPash Feb 25, 2024
4f5da2a
skip all blocking commands if enterprise
shacharPash Feb 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 55 additions & 7 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,62 @@ concurrency:
cancel-in-progress: true

jobs:
enterprise-tests:
name: Redis Enterprise
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
enterprise_version: ['7.2.4-92']
env_file_mode: ['enterprise', 'enterprise_oss_cluster']

steps:
- uses: actions/checkout@v4

- name: Load dotnenv for CI
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows/modes
mode: ${{ matrix.env_file_mode }}

- name: Clone ee docker code
uses: actions/checkout@v4
with:
repository: redislabs/redis-ee-docker
path: redis-ee-docker


- name: Start docker
working-directory: redis-ee-docker
env:
IMAGE: redislabs/redis-internal:${{ matrix.enterprise_version }}
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: ./build.sh

- name: .NET Core 8
uses: actions/setup-dotnet@v2

with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true

- name: Test
run: dotnet test -f net8.0 --no-build --verbosity detailed

dotnet_6_cluster:
name: .NET 6 on [redis-stack cluster]
uses: ./.github/workflows/reusable.yml
with:
redis_stack_type: cluster
clr_version: net6.0
mode: oss_cluster
dotnet_sdk_version: 6.0.0
dotenv_file: .github/cluster.env
secrets: inherit

dotnet_6:
Expand All @@ -37,8 +85,8 @@ jobs:
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net6.0
mode: standalone
dotnet_sdk_version: 6.0.0
dotenv_file: .github/standalone.env
secrets: inherit

dotnet_7_cluster:
Expand All @@ -47,8 +95,8 @@ jobs:
with:
redis_stack_type: cluster
clr_version: net7.0
mode: oss_cluster
dotnet_sdk_version: 7.0.0
dotenv_file: .github/cluster.env
secrets: inherit

dotnet_7:
Expand All @@ -62,8 +110,8 @@ jobs:
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net7.0
mode: standalone
dotnet_sdk_version: 7.0.0
dotenv_file: .github/standalone.env
secrets: inherit

dotnet_8_cluster:
Expand All @@ -72,8 +120,8 @@ jobs:
with:
redis_stack_type: cluster
clr_version: net8.0
mode: oss_cluster
dotnet_sdk_version: 8.0.0
dotenv_file: .github/cluster.env
secrets: inherit

dotnet_8:
Expand All @@ -87,8 +135,8 @@ jobs:
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net8.0
mode: standalone
dotnet_sdk_version: 8.0.0
dotenv_file: .github/standalone.env
secrets: inherit

build_and_test_windows:
Expand Down Expand Up @@ -130,4 +178,4 @@ jobs:
shell: cmd
run: |
START wsl ./redis-stack-server-${{env.redis_stack_version}}/bin/redis-stack-server &
dotnet test -f net481 --no-build --verbosity normal
dotnet test -f net481 --no-build --verbosity detailed
7 changes: 7 additions & 0 deletions .github/workflows/modes/.env.enterprise
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REDIS=127.0.0.1:6379
IS_ENTERPRISE=true
RE_USERNAME=test@test.com
RE_PASS=12345
RE_CLUSTER_NAME=test
RE_USE_OSS_CLUSTER=false
RE_DB_PORT=6379
8 changes: 8 additions & 0 deletions .github/workflows/modes/.env.enterprise_oss_cluster
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
REDIS_CLUSTER=127.0.0.1:6372
NUM_REDIS_CLUSTER_NODES=3
IS_ENTERPRISE=true
RE_USERNAME=test@test.com
RE_PASS=12345
RE_CLUSTER_NAME=test
RE_USE_OSS_CLUSTER=true
RE_DB_PORT=6378
File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions .github/workflows/reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
required: true
type: string

dotenv_file:
mode:
required: true
type: string
jobs:
Expand All @@ -39,14 +39,15 @@ jobs:
with:
dotnet-version: 8

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

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

# Make sure only the desired dotnet version is set both as target and as active SDK.
- name: Tweak target frameworks
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,4 @@ tests/NRedisStack.Tests/redis_credentials/redis_user.crt

# global.json
global.json
tests/NRedisStack.Tests/lcov.net8.0.info
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ dotnet test --environment="REDIS=<redisServer:port>"
```
e.g:
```bash
dotnet test --environment="REDIS=172.17.0.1:6379"
dotnet test --environment="REDIS=127.17.0.1:6379"
```

To run your tests against an oss cluster:
Expand Down
Loading
Loading