-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (71 loc) · 1.9 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
67
68
69
70
71
name: Playwright Tests
on:
push:
branches: [ main, dev ]
paths:
- ".github/workflows/playwright.yml"
- "Dockerfile"
- "docker-compose.dev.yml"
- "docker-compose.test.yml"
- "e2e/*"
- 'package.json'
- 'package-lock.json'
- 'prisma/**'
- 'public/**'
- 'tailwind.config.js'
- 'tsconfig.json'
- '**/*.js'
- '**/*.ts'
- '**/*.tsx'
- '**/*.css'
pull_request:
branches: [ main, dev ]
paths:
- ".github/workflows/playwright.yml"
- "Dockerfile"
- "docker-compose.dev.yml"
- "docker-compose.test.yml"
- "e2e/*"
- 'package.json'
- 'package-lock.json'
- 'prisma/**'
- 'public/**'
- 'tailwind.config.js'
- 'tsconfig.json'
- '**/*.js'
- '**/*.ts'
- '**/*.tsx'
- '**/*.css'
jobs:
e2e-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Create .env
run: cp .env.example .env && cp .env.example e2e/.env
working-directory: ./
- name: Docker Compose Up
run: docker compose -f docker-compose.test.yml --env-file .env up -d
working-directory: ./
- name: Change directory and install dependencies
run: npm ci
working-directory: e2e
# - name: Docker Compose Up NextJS
# run: docker compose -f docker-compose.test.yml --env-file .env up next-mokuro-bookshelf -d
# working-directory: ./
- name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: e2e
- name: Run Playwright tests
run: npx playwright test
working-directory: e2e
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30