39
39
description : ' Red Hat Account Extension repo branch'
40
40
type : string
41
41
required : true
42
+ mode :
43
+ description : ' Build mode for Podman Desktop'
44
+ type : choice
45
+ options :
46
+ - production
47
+ - development
42
48
43
49
jobs :
44
50
e2e-tests :
45
51
name : Red Hat Account Extension E2E tests
46
52
runs-on : ubuntu-24.04
47
- if : github.event_name == 'workflow_dispatch'
53
+ env :
54
+ MODE : ${{ inputs.mode }}
48
55
steps :
49
-
50
56
- uses : actions/checkout@v4
51
57
if : github.event_name == 'workflow_dispatch'
52
58
with :
@@ -110,12 +116,25 @@ jobs:
110
116
# allow unprivileged user namespace
111
117
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
112
118
113
- - name : Build Podman Desktop for E2E tests
119
+ - name : Build Podman Desktop for E2E tests Development Mode
114
120
working-directory : ./podman-desktop
121
+ if : ${{ env.MODE == 'development' }}
115
122
run : |
116
123
pnpm install
117
124
pnpm test:e2e:build
118
125
126
+ - name : Build Podman Desktop for E2E tests Production Mode
127
+ working-directory : ./podman-desktop
128
+ if : ${{ env.MODE == 'production' }}
129
+ env :
130
+ ELECTRON_ENABLE_INSPECT : true
131
+ run : |
132
+ pnpm install --frozen-lockfile
133
+ pnpm compile:current --linux dir
134
+ path=$(realpath ./dist/linux-unpacked/podman-desktop)
135
+ echo "Podman Desktop built binary: $path"
136
+ echo "PODMAN_DESKTOP_BINARY_PATH=$path" >> $GITHUB_ENV
137
+
119
138
- name : Execute pnpm in Red Hat Account Extension
120
139
working-directory : ${{ env.REPOSITORY }}
121
140
run : |
@@ -125,12 +144,20 @@ jobs:
125
144
jq --arg version "$version" '.devDependencies."@podman-desktop/tests-playwright" = $version' package.json > package.json_tmp && mv package.json_tmp package.json
126
145
pnpm install --no-frozen-lockfile
127
146
128
- - name : Run All E2E tests in Red Hat Account Extension
147
+ - name : Run All E2E tests in Red Hat Account Extension in Development Mode
129
148
working-directory : ${{ env.REPOSITORY }}
149
+ if : ${{ env.MODE == 'development' }}
130
150
env :
131
151
PODMAN_DESKTOP_ARGS : ${{ github.workspace }}/podman-desktop
132
152
run : pnpm test:e2e
133
153
154
+ - name : Run All E2E tests in Red Hat Account Extension in Production mode
155
+ working-directory : ${{ env.REPOSITORY }}
156
+ if : ${{ env.MODE == 'production' }}
157
+ env :
158
+ PODMAN_DESKTOP_BINARY : ${{ env.PODMAN_DESKTOP_BINARY_PATH }}
159
+ run : pnpm test:e2e
160
+
134
161
- uses : actions/upload-artifact@v4
135
162
if : always()
136
163
with :
0 commit comments