50
50
./gradlew :opensearch-security-common:publishToMavenLocal -Dbuild.snapshot=false
51
51
./gradlew :opensearch-security-client:publishToMavenLocal -Dbuild.snapshot=false
52
52
53
+ - name : Cache artifacts for dependent jobs
54
+ uses : actions/cache@v4.2.2
55
+ with :
56
+ path : ~/.m2/repository
57
+ key : maven-local-${{ github.run_id }}
58
+ restore-keys : |
59
+ maven-local-
60
+
53
61
test :
54
62
name : test
55
63
needs : [generate-test-list, publish-components-to-maven-local]
71
79
- name : Checkout security
72
80
uses : actions/checkout@v4
73
81
82
+ - name : Restore Maven Local Cache
83
+ uses : actions/cache@v4.2.2
84
+ with :
85
+ path : ~/.m2/repository
86
+ key : maven-local-${{ github.run_id }}
87
+ restore-keys : |
88
+ maven-local-
89
+
74
90
- name : Build and Test
75
91
uses : gradle/gradle-build-action@v3
76
92
with :
@@ -129,6 +145,14 @@ jobs:
129
145
- name : Checkout security
130
146
uses : actions/checkout@v4
131
147
148
+ - name : Restore Maven Local Cache
149
+ uses : actions/cache@v4.2.2
150
+ with :
151
+ path : ~/.m2/repository
152
+ key : maven-local-${{ github.run_id }}
153
+ restore-keys : |
154
+ maven-local-
155
+
132
156
- name : Run Integration Tests
133
157
uses : gradle/gradle-build-action@v3
134
158
with :
@@ -150,6 +174,48 @@ jobs:
150
174
path : |
151
175
./build/reports/
152
176
177
+ spi-tests :
178
+ name : spi-tests
179
+ needs : publish-components-to-maven-local
180
+ strategy :
181
+ fail-fast : false
182
+ matrix :
183
+ jdk : [21]
184
+ platform : [ubuntu-latest, windows-latest]
185
+ runs-on : ${{ matrix.platform }}
186
+
187
+ steps :
188
+ - name : Set up JDK for build and test
189
+ uses : actions/setup-java@v4
190
+ with :
191
+ distribution : temurin # Temurin is a distribution of adoptium
192
+ java-version : ${{ matrix.jdk }}
193
+
194
+ - name : Checkout security
195
+ uses : actions/checkout@v4
196
+
197
+ - name : Restore Maven Local Cache
198
+ uses : actions/cache@v4.2.2
199
+ with :
200
+ path : ~/.m2/repository
201
+ key : maven-local-${{ github.run_id }}
202
+ restore-keys : |
203
+ maven-local-
204
+
205
+ - name : Run SPI Tests
206
+ uses : gradle/gradle-build-action@v3
207
+ with :
208
+ cache-disabled : true
209
+ arguments : |
210
+ :opensearch-resource-sharing-spi:tests -Dbuild.snapshot=false
211
+
212
+ - uses : actions/upload-artifact@v4
213
+ if : always()
214
+ with :
215
+ name : spi-${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports
216
+ path : |
217
+ ./build/reports/
218
+
153
219
resource-tests :
154
220
env :
155
221
CI_ENVIRONMENT : resource-test
@@ -171,6 +237,14 @@ jobs:
171
237
- name : Checkout security
172
238
uses : actions/checkout@v4
173
239
240
+ - name : Restore Maven Local Cache
241
+ uses : actions/cache@v4.2.2
242
+ with :
243
+ path : ~/.m2/repository
244
+ key : maven-local-${{ github.run_id }}
245
+ restore-keys : |
246
+ maven-local-
247
+
174
248
- name : Run Resource Tests
175
249
uses : gradle/gradle-build-action@v3
176
250
with :
0 commit comments