48
48
-x openApiValidate
49
49
-x detekt
50
50
51
- organization_controller_test :
51
+ controller_tests :
52
52
runs-on : ubuntu-latest
53
53
needs :
54
54
- build
@@ -58,38 +58,14 @@ jobs:
58
58
permissions : read-all
59
59
60
60
if : github.event_name != 'pull_request_target'
61
-
62
- steps :
63
- - uses : actions/checkout@v4
64
-
65
- - name : Set up JDK
66
- uses : actions/setup-java@v4
67
- with :
68
- distribution : ' temurin'
69
- java-version : ' 21'
70
-
71
- - name : Setup Gradle
72
- uses : gradle/actions/setup-gradle@v4
73
- with :
74
- cache-disabled : true
75
-
76
- - name : Run Organization Controller tests
77
- env :
78
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
79
- run : ./gradlew :cosmotech-api:integrationTest --tests "com.cosmotech.api.home.organization.OrganizationControllerTests" -x spotlessCheck -x openApiValidate
80
-
81
-
82
- home_controller_test :
83
- runs-on : ubuntu-latest
84
- needs :
85
- - build
86
- env :
87
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
88
-
89
- permissions : read-all
90
-
91
- if : github.event_name != 'pull_request_target'
92
-
61
+ strategy :
62
+ fail-fast : false
63
+ matrix :
64
+ service :
65
+ - packageName : .organization
66
+ testPrefix : Organization
67
+ - packageName : " "
68
+ testPrefix : Home
93
69
steps :
94
70
- uses : actions/checkout@v4
95
71
@@ -104,11 +80,10 @@ jobs:
104
80
with :
105
81
cache-disabled : true
106
82
107
- - name : Run Home Controller tests
83
+ - name : Run ${{ matrix.service.testPrefix }} controller tests
108
84
env :
109
85
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
110
- run : ./gradlew :cosmotech-api:integrationTest --tests "com.cosmotech.api.home.HomeControllerTests" -x spotlessCheck -x openApiValidate
111
-
86
+ run : ./gradlew :cosmotech-api:integrationTest --tests "com.cosmotech.api.home${{ matrix.service.packageName }}.${{ matrix.service.testPrefix }}ControllerTests" -x spotlessCheck -x openApiValidate
112
87
113
88
unit_test :
114
89
runs-on : ubuntu-latest
@@ -144,8 +119,7 @@ jobs:
144
119
runs-on : ubuntu-latest
145
120
needs :
146
121
- unit_test
147
- - home_controller_test
148
- - organization_controller_test
122
+ - controller_tests
149
123
env :
150
124
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
151
125
@@ -176,8 +150,7 @@ jobs:
176
150
runs-on : ubuntu-latest
177
151
needs :
178
152
- unit_test
179
- - home_controller_test
180
- - organization_controller_test
153
+ - controller_tests
181
154
env :
182
155
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
183
156
@@ -213,8 +186,7 @@ jobs:
213
186
runs-on : ubuntu-latest
214
187
needs :
215
188
- unit_test
216
- - home_controller_test
217
- - organization_controller_test
189
+ - controller_tests
218
190
env :
219
191
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
220
192
@@ -250,8 +222,7 @@ jobs:
250
222
runs-on : ubuntu-latest
251
223
needs :
252
224
- unit_test
253
- - home_controller_test
254
- - organization_controller_test
225
+ - controller_tests
255
226
env :
256
227
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
257
228
@@ -288,8 +259,7 @@ jobs:
288
259
runs-on : ubuntu-latest
289
260
needs :
290
261
- unit_test
291
- - home_controller_test
292
- - organization_controller_test
262
+ - controller_tests
293
263
env :
294
264
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
295
265
@@ -326,8 +296,7 @@ jobs:
326
296
runs-on : ubuntu-latest
327
297
needs :
328
298
- unit_test
329
- - home_controller_test
330
- - organization_controller_test
299
+ - controller_tests
331
300
env :
332
301
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
333
302
@@ -363,8 +332,7 @@ jobs:
363
332
runs-on : ubuntu-latest
364
333
needs :
365
334
- unit_test
366
- - home_controller_test
367
- - organization_controller_test
335
+ - controller_tests
368
336
env :
369
337
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
370
338
0 commit comments