forked from ctrlplanedev/ctrlplane
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (62 loc) · 2.21 KB
/
playwright.yml
File metadata and controls
78 lines (62 loc) · 2.21 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
name: Playwright Tests
on:
push:
branches:
- main
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18
env:
POSTGRES_USER: ctrlplane_test
POSTGRES_PASSWORD: test_password
POSTGRES_DB: ctrlplane_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
defaults:
run:
working-directory: e2e
steps:
- uses: actions/checkout@v4
# - name: Setup
# uses: ./tooling/github/setup
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# - name: Set up Docker Compose
# run: |
# sed -i "s/ctrlplane\/webservice:.*/ctrlplane\/webservice:${GITHUB_SHA::7}/g" docker-compose.yaml
# sed -i "s/ctrlplane\/event-worker:.*/ctrlplane\/event-worker:${GITHUB_SHA::7}/g" docker-compose.yaml
# sed -i "s/ctrlplane\/jobs:.*/ctrlplane\/jobs:${GITHUB_SHA::7}/g" docker-compose.yaml
# sed -i "s/ctrlplane\/pty-proxy:.*/ctrlplane\/pty-proxy:${GITHUB_SHA::7}/g" docker-compose.yaml
# sed -i "s/ctrlplane\/migrations:.*/ctrlplane\/migrations:${GITHUB_SHA::7}/g" docker-compose.yaml
# docker-compose pull
# docker-compose up -d
# - name: Wait for services to be ready
# run: |
# # Wait for webservice to be ready
# timeout 60s bash -c 'until curl -s http://localhost:5173; do sleep 2; done'
# # Add other health checks as needed
# sleep 10 # Give additional time for all services to stabilize
# - name: Install Playwright Browsers
# run: pnpm exec playwright install --with-deps
# - name: Run Playwright tests
# run: pnpm exec playwright test
# env:
# BASE_URL: http://localhost:5173
# - uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 5
# - name: Docker Compose Logs on Failure
# if: failure()
# run: docker-compose logs