-
Notifications
You must be signed in to change notification settings - Fork 88
83 lines (68 loc) · 2.25 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
72
73
74
75
76
77
78
79
80
81
82
83
name: Playwright tests
on:
workflow_call:
jobs:
run-playwright:
name: Run Playwright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: './frontend'
- name: Checkout
uses: actions/checkout@v3
with:
repository: podkrepi-bg/api
ref: master
path: './api'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/.next/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Run db
working-directory: ./api
run: docker compose up -d pg-db
- name: Run api
working-directory: ./api
run: docker compose up -d --force-recreate --no-build migrate-db seed-db api keycloak
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install dependencies
working-directory: ./frontend
run: yarn
- name: Build frontend
working-directory: ./frontend
run: yarn run next build
- name: Setup env
working-directory: ./frontend
run: cp .env.local.example .env.local
- name: Start frontend
working-directory: ./frontend
run: yarn start &
- name: Install Playwright Browsers
working-directory: ./frontend
run: npx playwright install --with-deps
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true
# ## limits ssh access and adds the ssh public keys of the listed GitHub users
# limit-access-to-users: imilchev
- name: Run Playwright tests
working-directory: ./frontend
run: yarn playwright test e2e/local
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: ./frontend/playwright-report/
retention-days: 30