@@ -156,3 +156,100 @@ jobs:
156
156
with :
157
157
name : e2e-tests
158
158
path : ./**/tests/**/output/
159
+
160
+ e2e-tests-production :
161
+ name : e2e tests production mode
162
+ runs-on : ubuntu-24.04
163
+ needs : test
164
+ env :
165
+ SKIP_INSTALLATION : true
166
+ steps :
167
+ - uses : actions/checkout@v4
168
+ with :
169
+ path : podman-desktop-redhat-account-ext
170
+
171
+ - uses : pnpm/action-setup@v4
172
+ name : Install pnpm
173
+ with :
174
+ run_install : false
175
+ package_json_file : ./podman-desktop-redhat-account-ext/package.json
176
+
177
+ - uses : actions/setup-node@v4
178
+ with :
179
+ node-version : 20
180
+
181
+ # Checkout podman desktop
182
+ - uses : actions/checkout@v4
183
+ with :
184
+ repository : containers/podman-desktop
185
+ ref : main
186
+ path : podman-desktop
187
+
188
+ - name : Update podman
189
+ run : |
190
+ # ubuntu version from kubic repository to install podman we need (v5)
191
+ ubuntu_version='23.04'
192
+ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list"
193
+ curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add -
194
+ # install necessary dependencies for criu package which is not part of 23.04
195
+ sudo apt-get install -qq libprotobuf32t64 python3-protobuf libnet1
196
+ # install criu manually from static location
197
+ curl -sLO http://cz.archive.ubuntu.com/ubuntu/pool/universe/c/criu/criu_3.16.1-2_amd64.deb && sudo dpkg -i criu_3.16.1-2_amd64.deb
198
+ sudo apt-get update -qq
199
+ sudo apt-get -qq -y install podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \
200
+ sudo sh -c "echo 'deb http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" && \
201
+ curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - && \
202
+ sudo apt-get update && \
203
+ sudo apt-get -y install podman; }
204
+ podman version
205
+
206
+ - name : Revert unprivileged user namespace restrictions in Ubuntu 24.04
207
+ run : |
208
+ # allow unprivileged user namespace
209
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
210
+
211
+ - name : Build Podman Desktop for E2E tests locally in production mode
212
+ working-directory : ./podman-desktop
213
+ env :
214
+ ELECTRON_ENABLE_INSPECT : true
215
+ run : |
216
+ pnpm install --frozen-lockfile
217
+ pnpm compile:current --linux dir
218
+ path=$(realpath ./dist/linux-unpacked/podman-desktop)
219
+ echo "Podman Desktop built binary: $path"
220
+ echo "PODMAN_DESKTOP_BINARY_PATH=$path" >> $GITHUB_ENV
221
+
222
+ - name : Ensure getting current HEAD version of the test framework
223
+ working-directory : ./podman-desktop-redhat-account-ext
224
+ run : |
225
+ # workaround for https://github.com/containers/podman-desktop-extension-bootc/issues/712
226
+ version=$(npm view @podman-desktop/tests-playwright@next version)
227
+ echo "Version of @podman-desktop/tests-playwright to be used: $version"
228
+ jq --arg version "$version" '.devDependencies."@podman-desktop/tests-playwright" = $version' package.json > package.json_tmp && mv package.json_tmp package.json
229
+
230
+ - name : Execute pnpm in SSO Extension
231
+ working-directory : ./podman-desktop-redhat-account-ext
232
+ run : pnpm install --no-frozen-lockfile
233
+
234
+ - name : Build SSO extension from container file
235
+ working-directory : ./podman-desktop-redhat-account-ext
236
+ run : |
237
+ pnpm build
238
+ podman build -t local_sso_image ./
239
+ CONTAINER_ID=$(podman create localhost/local_sso_image --entrypoint "")
240
+ podman export $CONTAINER_ID > /tmp/local_sso_image.tar
241
+ mkdir -p tests/output/sso-tests-pd/plugins
242
+ tar -xf /tmp/local_sso_image.tar -C tests/output/sso-tests-pd/plugins/
243
+
244
+ - name : Run All E2E tests
245
+ working-directory : ./podman-desktop-redhat-account-ext
246
+ env :
247
+ PODMAN_DESKTOP_BINARY : ${{ env.PODMAN_DESKTOP_BINARY_PATH }}
248
+ run : |
249
+ pnpm test:e2e
250
+
251
+ - uses : actions/upload-artifact@v4
252
+ if : always()
253
+ with :
254
+ name : e2e-tests-production
255
+ path : ./**/tests/**/output/
0 commit comments