-
Notifications
You must be signed in to change notification settings - Fork 24
109 lines (89 loc) · 2.86 KB
/
playwright.yml
File metadata and controls
109 lines (89 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Playwright Tests
on:
push:
branches: [ main, master, develop ]
paths:
- 'core/src/main/webapp/ui/**'
pull_request:
branches: [ main, master, develop ]
paths:
- 'core/src/main/webapp/ui/**'
jobs:
test:
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: core/src/main/webapp/ui/package-lock.json
- name: Install UI dependencies
working-directory: core/src/main/webapp/ui
run: npm ci
- name: Install Playwright Browsers
working-directory: core/src/main/webapp/ui
run: npx playwright install --with-deps
- name: Build NemakiWare Dependencies
run: |
# Build parent POM first
echo "Installing parent POM..."
mvn clean install -N -DskipTests -q
# Build dependency modules
echo "Building common module..."
mvn clean install -f common/pom.xml -DskipTests -q
echo "Building cloudant-init module..."
mvn clean install -f cloudant-init/pom.xml -DskipTests -q
echo "Building solr module..."
mvn clean install -f solr/pom.xml -DskipTests -q
- name: Build NemakiWare Core
run: |
mvn clean package -f core/pom.xml -Pdevelopment -DskipTests -q
- name: Start NemakiWare Backend
run: |
cd docker
cp ../core/target/core.war core/core.war
docker compose -f docker-compose-simple.yml up -d --build
# Wait for backend to be ready
timeout 120s bash -c '
while ! curl -f -u admin:admin http://localhost:8080/core/atom/bedroom >/dev/null 2>&1; do
echo "Waiting for NemakiWare backend..."
sleep 5
done
'
echo "✅ NemakiWare backend is ready"
- name: Build UI
working-directory: core/src/main/webapp/ui
run: npm run build
- name: Run Playwright tests
working-directory: core/src/main/webapp/ui
env:
PLAYWRIGHT_BASE_URL: http://localhost:8080
run: npm run test
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: core/src/main/webapp/ui/playwright-report/
retention-days: 30
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: core/src/main/webapp/ui/test-results/
retention-days: 30
- name: Cleanup
if: always()
run: |
cd docker
docker compose -f docker-compose-simple.yml down
docker system prune -f