@@ -45,56 +45,51 @@ jobs:
45
45
strategy :
46
46
fail-fast : false
47
47
matrix :
48
- os : [windows-2022, ubuntu-24.04] # , macos-14
48
+ os : [windows-2022, ubuntu-24.04, macos-14]
49
49
runs-on : ${{ matrix.os }}
50
50
env :
51
51
SKIP_INSTALLATION : true
52
52
steps :
53
- # Checkout crc extension
54
- - uses : actions/checkout@v4
53
+
54
+ - name : Checkout crc extension
55
+ uses : actions/checkout@v4
55
56
with :
56
57
path : crc-extension
57
58
58
- # Checkout podman desktop
59
- - uses : actions/checkout@v4
59
+ - name : Checkout podman desktop
60
+ uses : actions/checkout@v4
60
61
with :
61
- repository : containers /podman-desktop
62
+ repository : podman-desktop /podman-desktop
62
63
ref : main
63
64
path : podman-desktop
64
65
65
- # Checkout sso extension
66
- - uses : actions/checkout@v4
67
- if : matrix.os == 'windows-2022'
66
+ - name : Checkout sso extension (crc-extension dependency)
67
+ uses : actions/checkout@v4
68
+ if : matrix.os == 'windows-2022' || matrix.os == 'macos-14'
68
69
with :
69
70
repository : redhat-developer/podman-desktop-redhat-account-ext
70
71
ref : main
71
72
path : sso-extension
72
73
73
- - uses : actions/setup-node@v4
74
+ - name : Install node
75
+ uses : actions/setup-node@v4
74
76
with :
75
77
node-version : 20
76
78
77
- - uses : pnpm/action-setup@v4
78
- name : Install pnpm
79
+ - name : Install pnpm
80
+ uses : pnpm/action-setup@v4
79
81
with :
80
82
run_install : false
81
83
package_json_file : ./podman-desktop/package.json
82
84
83
- - name : Install Podman Desktop dependencies
84
- working-directory : ./podman-desktop
85
- run : pnpm install
86
-
87
- - name : Install SSO extension dependencies
88
- if : matrix.os == 'windows-2022'
89
- working-directory : ./sso-extension
90
- run : pnpm install
91
-
92
- - name : Build Podman Desktop for E2E tests
85
+ - name : Install & build Podman Desktop for E2E tests
93
86
working-directory : ./podman-desktop
94
- run : pnpm test:e2e:build
87
+ run : |
88
+ pnpm install
89
+ pnpm test:e2e:build
95
90
96
- - name : Ensure getting current HEAD version of the test framework (ubuntu )
97
- if : matrix.os == 'ubuntu-24.04'
91
+ - name : Ensure getting current HEAD version of the test framework (Ubuntu/MacOS )
92
+ if : matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-14'
98
93
working-directory : ./crc-extension
99
94
run : |
100
95
# workaround for https://github.com/containers/podman-desktop-extension-bootc/issues/712
@@ -124,22 +119,33 @@ jobs:
124
119
125
120
- name : Install CRC extension dependencies
126
121
working-directory : ./crc-extension
127
- run : yarn install --check-files
128
-
129
- - name : Execute yarn in OpenShift Local Extension
130
- working-directory : ./crc-extension
131
- run : yarn --frozen-lockfile
122
+ run : |
123
+ # workaround for https://github.com/containers/podman-desktop-extension-bootc/issues/712
124
+ # Install scoop installer
125
+ Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
126
+ scoop --version
127
+ # Install jq using scoop
128
+ scoop install jq
129
+ # Fetch the version of the npm package
130
+ $version = npm view @podman-desktop/tests-playwright@next version
131
+ Write-Host "Version of @podman-desktop/tests-playwright to be used: $version"
132
+ # Update package.json using jq
133
+ jq --arg version "$version" '.devDependencies."@podman-desktop/tests-playwright" = $version' package.json > package.json_tmp
134
+ # Replace the old package.json with the updated one
135
+ Move-Item -Path package.json_tmp -Destination package.json -Force
136
+ shell : pwsh
132
137
133
138
- name : Revert unprivileged user namespace restrictions in Ubuntu 24.04
134
139
if : matrix.os == 'ubuntu-24.04'
135
140
run : |
136
141
# allow unprivileged user namespace
137
142
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
138
143
139
- - name : Build OpenShift Local extension from container file and SSO dependency (Ubuntu, podman)
144
+ - name : Install & build OpenShift Local extension from container file and SSO dependency (Ubuntu, podman)
140
145
if : matrix.os == 'ubuntu-24.04'
141
146
working-directory : ./crc-extension
142
147
run : |
148
+ yarn install --check-files
143
149
# build crc extension
144
150
podman build -t openshift_local_image . -f ./oci/Containerfile.multistage
145
151
CONTAINER_ID_CRC=$(podman create localhost/openshift_local_image --entrypoint "")
@@ -156,12 +162,28 @@ jobs:
156
162
mv tests/playwright/output/crc-tests-pd/plugins/extension/ tests/playwright/output/crc-tests-pd/plugins/crcextension
157
163
tar -xf /tmp/sso_extension.tar -C tests/playwright/output/crc-tests-pd/plugins/
158
164
mv tests/playwright/output/crc-tests-pd/plugins/extension/ tests/playwright/output/crc-tests-pd/plugins/ssoextension
159
-
160
- - name : Build OpenShift Local extension locally (Windows, docker) # from container file is not available yet
165
+
166
+ - name : Install & build OpenShift Local extension locally (MacOS) # from container file is not available yet
167
+ if : matrix.os == 'macos-14'
168
+ shell : bash
169
+ working-directory : ./crc-extension
170
+ run : |
171
+ yarn install --check-files
172
+ # -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
173
+ # build extension
174
+ yarn build
175
+ # make expected test folders
176
+ mkdir -p tests/playwright/output/crc-tests-pd/plugins/crcextension
177
+ mkdir -p tests/playwright/output/crc-tests-pd/plugins/ssoextension
178
+ # move necessary files there
179
+ cp -R package.json LICENSE icon.png README.md dist tests/playwright/output/crc-tests-pd/plugins/crcextension
180
+
181
+ - name : Install & build OpenShift Local extension locally (Windows) # from container file is not available yet
161
182
if : matrix.os == 'windows-2022'
162
183
working-directory : ./crc-extension
163
184
shell : pwsh
164
185
run : |
186
+ yarn install --check-files
165
187
# -- following https://github.com/crc-org/crc-extension/blob/main/oci/Containerfile.multistage --
166
188
# build extension
167
189
yarn build
@@ -172,11 +194,25 @@ jobs:
172
194
# move necessary files there
173
195
'package.json', 'LICENSE', 'icon.png', 'README.md', 'dist' | % { cp $_ ./tests/playwright/output/crc-tests-pd/plugins/crcextension -Recurse -Force}
174
196
175
- - name : Build SSO extension (crc dependency) locally (Windows, docker) # from container file is not available yet
197
+ - name : Install & build SSO extension (crc dependency) locally (MacOS) # from container file is not available yet
198
+ if : matrix.os == 'macos-14'
199
+ working-directory : ./sso-extension
200
+ shell : bash
201
+ run : |
202
+ pnpm install
203
+ # -- following https://github.com/redhat-developer/podman-desktop-redhat-account-ext/blob/main/Containerfile --
204
+ # build extension
205
+ pnpm build
206
+ # put the contents into its expected folder:
207
+ mkdir -p ../crc-extension/tests/playwright/output/crc-tests-pd/plugins/ssoextension
208
+ cp -R ./builtin/redhat-authentication.cdix/* ../crc-extension/tests/playwright/output/crc-tests-pd/plugins/ssoextension
209
+
210
+ - name : Install & build SSO extension (crc dependency) locally (Windows) # from container file is not available yet
176
211
if : matrix.os == 'windows-2022'
177
212
working-directory : ./sso-extension
178
213
shell : pwsh
179
214
run : |
215
+ pnpm install
180
216
# -- following https://github.com/redhat-developer/podman-desktop-redhat-account-ext/blob/main/Containerfile --
181
217
# build extension
182
218
pnpm build
0 commit comments