Skip to content

Commit 5058d52

Browse files
committed
test
1 parent 060672c commit 5058d52

File tree

14 files changed

+109
-11
lines changed

14 files changed

+109
-11
lines changed

.github/workflows/playwright.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
test:
10-
timeout-minutes: 5
10+
timeout-minutes: 10
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
@@ -22,8 +22,34 @@ jobs:
2222
- name: Install Playwright browsers
2323
run: npx playwright install --with-deps chromium
2424

25+
- name: Build and start frontend container
26+
run: |
27+
docker compose build ui
28+
docker compose up -d ui
29+
30+
- name: Wait for frontend to be ready
31+
run: |
32+
timeout=60
33+
counter=0
34+
until curl -f http://localhost:8080 || [ $counter -eq $timeout ]; do
35+
sleep 1
36+
counter=$((counter+1))
37+
done
38+
if [ $counter -eq $timeout ]; then
39+
echo "Frontend did not become ready in time"
40+
docker compose logs ui
41+
exit 1
42+
fi
43+
2544
- name: Run Playwright tests
2645
run: npx playwright test
46+
env:
47+
CI: true
48+
BASE_URL: http://localhost:8080
49+
50+
- name: Stop frontend container
51+
if: always()
52+
run: docker compose down
2753

2854
- uses: actions/upload-artifact@v4
2955
if: always()

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### STAGE 1: Build ###
22
# This image is around 50 megabytes
3-
FROM node:18-alpine3.18 AS builder
3+
FROM node:20-alpine AS builder
44

55
# Create app directory
66
WORKDIR /app
-1.44 KB
Loading
-13.8 KB
Loading
-7.58 KB
Loading
-12.5 KB
Loading
-4.01 KB
Loading
-1.25 KB
Loading
-7.4 KB
Loading
-8.51 KB
Loading

0 commit comments

Comments
 (0)