13
13
CI_ENVIRONMENT : normal
14
14
15
15
jobs :
16
+ Get-CI-Image-Tag :
17
+ uses : opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
18
+ with :
19
+ product : opensearch
20
+
16
21
generate-test-list :
17
22
runs-on : ubuntu-latest
18
23
outputs :
@@ -32,14 +37,14 @@ jobs:
32
37
run : |
33
38
echo "separateTestsNames=$(./gradlew listTasksAsJSON -q --console=plain | tail -n 1)" >> $GITHUB_OUTPUT
34
39
35
- test :
40
+ test-windows :
36
41
name : test
37
42
needs : generate-test-list
38
43
strategy :
39
44
fail-fast : false
40
45
matrix :
41
46
gradle_task : ${{ fromJson(needs.generate-test-list.outputs.separateTestsNames) }}
42
- platform : [windows-latest, ubuntu-latest ]
47
+ platform : [windows-latest]
43
48
jdk : [21]
44
49
runs-on : ${{ matrix.platform }}
45
50
67
72
path : |
68
73
./build/reports/
69
74
75
+ test-linux :
76
+ name : test
77
+ needs : ["generate-test-list", "Get-CI-Image-Tag"]
78
+ strategy :
79
+ fail-fast : false
80
+ matrix :
81
+ gradle_task : ${{ fromJson(needs.generate-test-list.outputs.separateTestsNames) }}
82
+ platform : [ubuntu-latest]
83
+ jdk : [21]
84
+ runs-on : ubuntu-latest
85
+ container :
86
+ # using the same image which is used by opensearch-build to build the OpenSearch Distribution
87
+ # this image tag is subject to change as more dependencies and updates will arrive over time
88
+ image : ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
89
+ # need to switch to root so that github actions can install runner binary on container without permission issues.
90
+ options : ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}
91
+
92
+ steps :
93
+ - name : Run start commands
94
+ run : ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
95
+ - name : Set up JDK for build and test
96
+ uses : actions/setup-java@v4
97
+ with :
98
+ distribution : temurin # Temurin is a distribution of adoptium
99
+ java-version : ${{ matrix.jdk }}
100
+
101
+ - name : Checkout security
102
+ uses : actions/checkout@v4
103
+
104
+ - name : Build and Test
105
+ uses : gradle/gradle-build-action@v3
106
+ with :
107
+ cache-disabled : true
108
+ arguments : |
109
+ ${{ matrix.gradle_task }} -Dbuild.snapshot=false
110
+
111
+ - uses : actions/upload-artifact@v4
112
+ if : always()
113
+ with :
114
+ name : ${{ matrix.platform }}-JDK${{ matrix.jdk }}-${{ matrix.gradle_task }}-reports
115
+ path : |
116
+ ./build/reports/
117
+
70
118
report-coverage :
71
- needs : ["test", "integration-tests"]
119
+ needs : ["test-windows ", "test-linux", " integration-tests-windows", "integration-tests-linux "]
72
120
runs-on : ubuntu-latest
73
121
steps :
74
122
- uses : actions/checkout@v4
@@ -92,13 +140,13 @@ jobs:
92
140
verbose: true
93
141
94
142
95
- integration-tests :
143
+ integration-tests-windows :
96
144
name : integration-tests
97
145
strategy :
98
146
fail-fast : false
99
147
matrix :
100
148
jdk : [21]
101
- platform : [ubuntu-latest, windows-latest]
149
+ platform : [windows-latest]
102
150
runs-on : ${{ matrix.platform }}
103
151
104
152
steps :
@@ -125,6 +173,47 @@ jobs:
125
173
path : |
126
174
./build/reports/
127
175
176
+ integration-tests-linux :
177
+ name : integration-tests
178
+ needs : ["Get-CI-Image-Tag"]
179
+ strategy :
180
+ fail-fast : false
181
+ matrix :
182
+ jdk : [21]
183
+ platform : [ubuntu-latest]
184
+ runs-on : ubuntu-latest
185
+ container :
186
+ # using the same image which is used by opensearch-build team to build the OpenSearch Distribution
187
+ # this image tag is subject to change as more dependencies and updates will arrive over time
188
+ image : ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
189
+ # need to switch to root so that github actions can install runner binary on container without permission issues.
190
+ options : ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}
191
+
192
+ steps :
193
+ - name : Run start commands
194
+ run : ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
195
+ - name : Set up JDK for build and test
196
+ uses : actions/setup-java@v4
197
+ with :
198
+ distribution : temurin # Temurin is a distribution of adoptium
199
+ java-version : ${{ matrix.jdk }}
200
+
201
+ - name : Checkout security
202
+ uses : actions/checkout@v4
203
+
204
+ - name : Build and Test
205
+ uses : gradle/gradle-build-action@v3
206
+ with :
207
+ cache-disabled : true
208
+ arguments : |
209
+ integrationTest -Dbuild.snapshot=false
210
+
211
+ - uses : actions/upload-artifact@v4
212
+ if : always()
213
+ with :
214
+ name : integration-${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports
215
+ path : |
216
+ ./build/reports/
128
217
129
218
resource-tests :
130
219
env :
0 commit comments