Modernise & deploy #1

Merged
andras merged 25 commits from asch/modernise into master 2026-05-31 16:48:45 +01:00
Showing only changes of commit e94ea62ee1 - Show all commits

View file

@ -139,14 +139,29 @@ jobs:
- name: Run Playwright - name: Run Playwright
run: | run: |
docker run --rm \ set -eux
# Sibling-container (Docker-out-of-Docker) setup: the host daemon can't
# see this job's filesystem, so `-v "$(pwd)/frontend:/work"` would mount
# an empty dir. Instead create the container, copy the source IN, run,
# then copy artifacts back OUT — all via the CLI, which reads/writes the
# job container's filesystem.
cid=$(docker create \
--network life-towers_default \ --network life-towers_default \
-v "$(pwd)/frontend:/work" \
-w /work \
-e PLAYWRIGHT_BASE_URL=http://life-towers:8000 \ -e PLAYWRIGHT_BASE_URL=http://life-towers:8000 \
-e CI=true \ -e CI=true \
mcr.microsoft.com/playwright:v1.60.0-noble \ mcr.microsoft.com/playwright:v1.60.0-noble \
sh -c 'npm ci && npx playwright test' sh -c 'cd /work && npm ci && npx playwright test')
# /work does not exist yet, so cp creates it from frontend's contents.
docker cp ./frontend "$cid":/work
# Run, but always copy artifacts back even when tests fail.
set +e
docker start -a "$cid"
code=$?
set -e
docker cp "$cid":/work/playwright-report ./frontend/ || true
docker cp "$cid":/work/visuals ./frontend/ || true
docker rm -f "$cid" >/dev/null 2>&1 || true
exit "$code"
- name: Upload Playwright report - name: Upload Playwright report
if: always() if: always()