-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (59 loc) · 1.67 KB
/
playwright.yml
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
name: Playwright Tests
on:
push:
paths:
- 'daikoku/app/**'
- 'daikoku/javascript/**'
- '.github/workflows/playwright.yml'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- uses: sbt/setup-sbt@v1
- uses: coursier/cache-action@v6
- name: Installing dependencies
run: |
cd daikoku/javascript
rm -rf node_modules/
npm ci
npm run build
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: initialize backend build
run: |
cd daikoku
sbt -Dsbt.color=always -Dsbt.supershell=false ';clean;compile;dist'
sbt 'docker:publishLocal'
- name: Docker Compose Action
uses: hoverkraft-tech/compose-action@v2.2.0
with:
compose-file: "./daikoku/javascript/tests/docker-compose.yml"
- name: Wait for API to be ready
run: |
echo "Waiting for API to be up..."
until curl --silent --fail http://localhost:13200/health; do
printf '.'
sleep 2
done
echo "API is ready!"
- name: Run Playwright tests
run: |
pwd
cd ./daikoku/javascript/tests
npm ci
npx playwright install --with-deps chromium
npx playwright test --project chromium
env:
CI: true