-
Notifications
You must be signed in to change notification settings - Fork 64
55 lines (42 loc) · 1.36 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
name: Playwright Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Build and start services
run: docker-compose up -d --build
- name: Wait for container to become available
run: |
npx wait-on http://localhost:8080
sleep 30 # Aumenta el tiempo de espera adicional para asegurarte de que el servidor está listo
- name: Check Docker logs
run: docker-compose logs
- name: Install npm dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Stop services
run: docker-compose down