@@ -147,10 +147,122 @@ jobs:
147147 path : blob-report
148148 retention-days : 1
149149
150+ playwright-installer-tests :
151+ needs : [gate, playwright-setup]
152+ timeout-minutes : 30
153+ name : Playwright tests for installer
154+ runs-on : ubuntu-latest
155+
156+ # The installation-wizard tests exercise every supported database backend, so
157+ # they need reachable database service containers. The Nextcloud container is
158+ # joined to the GitHub Actions network at startup so it can resolve these by
159+ # hostname (see tests/playwright/start-nextcloud-server.js).
160+ services :
161+ mysql :
162+ image : mysql:9.7 # zizmor: ignore[unpinned-images]
163+ ports :
164+ - ' 3306/tcp'
165+ env :
166+ MYSQL_ROOT_PASSWORD : rootpassword
167+ MYSQL_USER : nextcloud
168+ MYSQL_PASSWORD : nextcloud
169+ MYSQL_DATABASE : nextcloud
170+ options : --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
171+
172+ mariadb :
173+ image : mariadb:12.3 # zizmor: ignore[unpinned-images]
174+ ports :
175+ - ' 3306/tcp'
176+ env :
177+ MARIADB_ROOT_PASSWORD : rootpassword
178+ MARIADB_USER : nextcloud
179+ MARIADB_PASSWORD : nextcloud
180+ MARIADB_DATABASE : nextcloud
181+ options : --health-cmd="mariadb-admin ping" --health-interval 5s --health-timeout 2s --health-retries 5
182+
183+ postgres :
184+ image : postgres:18 # zizmor: ignore[unpinned-images]
185+ ports :
186+ - ' 5432/tcp'
187+ env :
188+ POSTGRES_USER : root
189+ POSTGRES_PASSWORD : rootpassword
190+ POSTGRES_DB : nextcloud
191+ options : --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
192+
193+ oracle :
194+ image : ghcr.io/gvenzl/oracle-free:23 # zizmor: ignore[unpinned-images]
195+ ports :
196+ - ' 1521'
197+ env :
198+ ORACLE_PASSWORD : oracle
199+ options : --health-cmd healthcheck.sh --health-interval 20s --health-timeout 10s --health-retries 10
200+
201+ steps :
202+ - name : Restore context
203+ id : cache
204+ uses : buildjet/cache/restore@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
205+ with :
206+ key : playwright-context-${{ github.run_id }}
207+ path : ./
208+
209+ - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
210+ if : steps.cache.outputs.cache-hit != 'true'
211+ with :
212+ persist-credentials : false
213+ submodules : true # for 3rdparty
214+
215+ - name : Read package.json
216+ if : steps.cache.outputs.cache-hit != 'true'
217+ uses : nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
218+ id : versions
219+
220+ - name : Set up node
221+ if : steps.cache.outputs.cache-hit != 'true'
222+ uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
223+ with :
224+ node-version : ${{ steps.versions.outputs.node-version }}
225+
226+ - name : Set up npm
227+ if : steps.cache.outputs.cache-hit != 'true'
228+ run : npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
229+
230+ - name : Install dependencies and build
231+ if : steps.cache.outputs.cache-hit != 'true'
232+ run : |
233+ npm ci
234+ npm run build --if-present
235+
236+ - name : Install Playwright browsers
237+ run : npx playwright install --with-deps
238+
239+ - name : Run Playwright setup tests
240+ run : npm run playwright:setup
241+ env :
242+ PLAYWRIGHT_SETUP : ' true'
243+
244+ - name : Show logs
245+ if : failure()
246+ run : |
247+ for id in $(docker ps -aq); do
248+ docker container inspect "$id" --format '=== Logs for container {{.Name}} ==='
249+ docker logs "$id" >> nextcloud.log
250+ done
251+ echo '=== Nextcloud server logs ==='
252+ docker exec nextcloud-e2e-test-server_server cat data/nextcloud.log || true
253+
254+ - name : Upload blob report to GitHub Actions Artifacts
255+ if : ${{ !cancelled() }}
256+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
257+ with :
258+ name : blob-report-setup
259+ path : blob-report
260+ retention-days : 1
261+
150262 merge-reports :
151263 # Merge reports after playwright-tests, even if some shards have failed
152264 if : ${{ !cancelled() }}
153- needs : [gate, playwright-tests]
265+ needs : [gate, playwright-tests, playwright-installer-tests ]
154266
155267 runs-on : ubuntu-latest-low
156268 steps :
@@ -206,12 +318,12 @@ jobs:
206318 permissions :
207319 contents : none
208320 runs-on : ubuntu-latest-low
209- needs : [gate, playwright-tests]
321+ needs : [gate, playwright-tests, playwright-installer-tests ]
210322
211323 if : always()
212324
213325 name : playwright-test-summary
214326
215327 steps :
216328 - name : Summary status
217- run : if ${{ needs.playwright-tests.result != 'success' }}; then exit 1; fi
329+ run : if ${{ needs.playwright-tests.result != 'success' || needs.playwright-installer-tests.result != 'success' }}; then exit 1; fi
0 commit comments