7
7
pull_request :
8
8
branches : [ main ]
9
9
10
- permissions :
11
- pull-requests : write
12
-
13
10
concurrency :
14
11
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15
12
cancel-in-progress : true
61
58
kubernetes-integration-tests :
62
59
runs-on : ubuntu-latest
63
60
needs : ci
61
+ permissions :
62
+ pull-requests : write
64
63
65
64
steps :
66
65
- uses : actions/checkout@v4
71
70
distribution : ' temurin'
72
71
cache : ' gradle'
73
72
- name : Setup Gradle
74
- uses : gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
73
+ uses : gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
75
74
with :
76
75
add-job-summary : ' on-failure'
77
76
add-job-summary-as-pr-comment : ' on-failure'
@@ -102,4 +101,107 @@ jobs:
102
101
name : kubernetes-integration-tests-reports
103
102
path : |
104
103
build/test-results/**/*.xml
105
- build/jacoco/
104
+ build/jacoco/
105
+
106
+ cluster-integration-ui-tests :
107
+ name : Run Integration UI Tests with KIND
108
+ runs-on : ubuntu-latest
109
+ needs : kubernetes-integration-tests
110
+ permissions :
111
+ checks : write
112
+ contents : read
113
+ pull-requests : write
114
+
115
+ steps :
116
+ - uses : actions/checkout@v4
117
+ - name : Set up JDK 17
118
+ uses : actions/setup-java@v4
119
+ with :
120
+ java-version : 17
121
+ distribution : ' temurin'
122
+ cache : ' gradle'
123
+ - name : Setup Gradle
124
+ uses : gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
125
+ with :
126
+ add-job-summary : ' on-failure'
127
+ add-job-summary-as-pr-comment : ' on-failure'
128
+ validate-wrappers : true
129
+ - uses : container-tools/kind-action@0ad70e2299366b0e1552c7240f4e4567148f723e # v2.0.4
130
+ name : Start cluster
131
+ # service setup disabled along with service test because service binding operator is deprecated, and postgres service isn't available anymore
132
+ # - name: Setup cluster
133
+ # run: |
134
+ # curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0
135
+ # kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml
136
+ # kubectl create -f https://operatorhub.io/install/stable/cloud-native-postgresql.yaml
137
+ # nb=0
138
+ # echo -n "Waiting for operator to show up "
139
+ # while [ "$nb" != "2" ]
140
+ # do
141
+ # echo -n "."
142
+ # sleep 1
143
+ # nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l`
144
+ # done
145
+ - name : Grant execute permission for gradlew
146
+ run : chmod +x gradlew
147
+ - name : Play cluster integration UI tests
148
+ env :
149
+ CLUSTER_ALREADY_LOGGED_IN : ' true'
150
+ run : xvfb-run --server-args="-screen 0 1920x1080x24" ./gradlew integrationUITest --continue --info
151
+ - name : Publish tests reports
152
+ uses : actions/upload-artifact@v4
153
+ if : always()
154
+ with :
155
+ name : cluster-integration-ui-tests-reports
156
+ path : |
157
+ build/test-results/**/*.xml
158
+ build/jacoco/
159
+ - name : Publish screenshots as artifacts
160
+ if : failure()
161
+ uses : actions/upload-artifact@v4
162
+ with :
163
+ name : cluster-integration-ui-tests-screenshots
164
+ path : ./build/screenshots$
165
+
166
+
167
+ no-context-integration-ui-tests :
168
+ name : Run Integration UI Tests with NO Context
169
+ runs-on : ubuntu-latest
170
+ needs : kubernetes-integration-tests
171
+ permissions :
172
+ checks : write
173
+ contents : read
174
+ pull-requests : write
175
+
176
+ steps :
177
+ - uses : actions/checkout@v4
178
+ - name : Set up JDK 17
179
+ uses : actions/setup-java@v4
180
+ with :
181
+ java-version : 17
182
+ distribution : ' temurin'
183
+ cache : ' gradle'
184
+ - name : Setup Gradle
185
+ uses : gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
186
+ with :
187
+ add-job-summary : ' on-failure'
188
+ add-job-summary-as-pr-comment : ' on-failure'
189
+ validate-wrappers : true
190
+ - name : Grant execute permission for gradlew
191
+ run : chmod +x gradlew
192
+ - name : Play integration UI tests
193
+ run : xvfb-run --server-args="-screen 0 1920x1080x24" ./gradlew integrationUITest --continue
194
+ - name : Publish tests reports
195
+ uses : actions/upload-artifact@v4
196
+ if : always()
197
+ with :
198
+ name : no-context-integration-ui-tests-reports
199
+ path : |
200
+ build/test-results/**/*.xml
201
+ build/jacoco/
202
+ - name : Publish screenshots as artifacts
203
+ if : failure()
204
+ uses : actions/upload-artifact@v4
205
+ with :
206
+ name : no-context-integration-ui-tests-screenshots
207
+ path : ./build/screenshots
0 commit comments