Skip to content

Commit ec10e19

Browse files
authored
Update e2e-main.yaml
1 parent eea4dd5 commit ec10e19

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

.github/workflows/e2e-main.yaml

+31-4
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,20 @@ on:
3939
description: 'Red Hat Account Extension repo branch'
4040
type: string
4141
required: true
42+
mode:
43+
description: 'Build mode for Podman Desktop'
44+
type: choice
45+
options:
46+
- production
47+
- development
4248

4349
jobs:
4450
e2e-tests:
4551
name: Red Hat Account Extension E2E tests
4652
runs-on: ubuntu-24.04
47-
if: github.event_name == 'workflow_dispatch'
53+
env:
54+
MODE: ${{ inputs.mode }}
4855
steps:
49-
5056
- uses: actions/checkout@v4
5157
if: github.event_name == 'workflow_dispatch'
5258
with:
@@ -110,12 +116,25 @@ jobs:
110116
# allow unprivileged user namespace
111117
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
112118
113-
- name: Build Podman Desktop for E2E tests
119+
- name: Build Podman Desktop for E2E tests Development Mode
114120
working-directory: ./podman-desktop
121+
if: ${{ env.MODE == 'development' }}
115122
run: |
116123
pnpm install
117124
pnpm test:e2e:build
118125
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+
119138
- name: Execute pnpm in Red Hat Account Extension
120139
working-directory: ${{ env.REPOSITORY }}
121140
run: |
@@ -125,12 +144,20 @@ jobs:
125144
jq --arg version "$version" '.devDependencies."@podman-desktop/tests-playwright" = $version' package.json > package.json_tmp && mv package.json_tmp package.json
126145
pnpm install --no-frozen-lockfile
127146
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
129148
working-directory: ${{ env.REPOSITORY }}
149+
if: ${{ env.MODE == 'development' }}
130150
env:
131151
PODMAN_DESKTOP_ARGS: ${{ github.workspace }}/podman-desktop
132152
run: pnpm test:e2e
133153

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+
134161
- uses: actions/upload-artifact@v4
135162
if: always()
136163
with:

0 commit comments

Comments
 (0)