forked from redis/NRedisStack
-
Notifications
You must be signed in to change notification settings - Fork 0
178 lines (159 loc) · 5.17 KB
/
integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: Integration Tests
on:
push:
paths-ignore:
- 'docs/**'
- '**/*.md'
branches:
- master
pull_request:
schedule:
- cron: "0 1 * * *"
concurrency:
group: ${{ github.event.pull_request.number || github.ref }}-integration
cancel-in-progress: true
jobs:
enterprise-tests:
name: Redis Enterprise
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
enterprise_version: ['7.4.2-54']
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:${{ matrix.enterprise_version }}
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 -p:BuildInParallel=false tests/Test.proj --logger GitHubActions
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
secrets: inherit
dotnet_6:
name: .NET 6 on [redis-stack ${{matrix.redis-stack-type}}]
uses: ./.github/workflows/reusable.yml
strategy:
fail-fast: false
max-parallel: 5
matrix:
redis-stack-type: ['edge', '6.2.6', '7.2.0-RC3']
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net6.0
mode: standalone
dotnet_sdk_version: 6.0.0
secrets: inherit
dotnet_7_cluster:
name: .NET 7 on [redis-stack cluster]
uses: ./.github/workflows/reusable.yml
with:
redis_stack_type: cluster
clr_version: net7.0
mode: oss_cluster
dotnet_sdk_version: 7.0.0
secrets: inherit
dotnet_7:
name: .NET 7 on [redis-stack ${{matrix.redis-stack-type}}]
uses: ./.github/workflows/reusable.yml
strategy:
fail-fast: false
max-parallel: 5
matrix:
redis-stack-type: ['edge', '6.2.6', '7.2.0-RC3']
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net7.0
mode: standalone
dotnet_sdk_version: 7.0.0
secrets: inherit
dotnet_8_cluster:
name: .NET 8 on [redis-stack cluster]
uses: ./.github/workflows/reusable.yml
with:
redis_stack_type: cluster
clr_version: net8.0
mode: oss_cluster
dotnet_sdk_version: 8.0.0
secrets: inherit
dotnet_8:
name: .NET 8 on [redis-stack ${{matrix.redis-stack-type}}]
uses: ./.github/workflows/reusable.yml
strategy:
fail-fast: false
max-parallel: 5
matrix:
redis-stack-type: ['edge', '6.2.6', '7.2.0-RC3']
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net8.0
mode: standalone
dotnet_sdk_version: 8.0.0
secrets: inherit
build_and_test_windows:
name: Windows Test ${{matrix.redis-stack-version}}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
redis-stack-version: ['6.2.6-v9', '7.2.0-RC3']
env:
redis_stack_version: ${{matrix.redis-stack-version}}
USER_NAME: ${{ secrets.USER_NAME }}
PASSWORD: ${{ secrets.PASSWORD }}
ENDPOINT: ${{ secrets.ENDPOINT }}
steps:
- uses: actions/checkout@v3
- uses: Vampire/setup-wsl@v2
with:
distribution: Ubuntu-22.04
- name: Install Redis
shell: wsl-bash {0}
run: |
sudo apt-get update
sudo apt-get install curl -y && sudo apt-get install gpg -y && apt-get install lsb-release -y && apt-get install libgomp1 -y
curl https://packages.redis.io/redis-stack/redis-stack-server-${{env.redis_stack_version}}.jammy.x86_64.tar.gz -o redis-stack.tar.gz
tar xf redis-stack.tar.gz
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
- name: Save test certificates
shell: wsl-bash {0}
run: |
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/net481/redis_ca.pem
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net481/redis_user.crt
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net481/redis_user_private.key
ls -R
- name: Test
shell: cmd
run: |
START wsl ./redis-stack-server-${{env.redis_stack_version}}/bin/redis-stack-server &
dotnet test -f net481 --no-build --verbosity detailed -p:BuildInParallel=false tests/Test.proj --logger GitHubActions