-
-
Notifications
You must be signed in to change notification settings - Fork 36
51 lines (49 loc) · 1.45 KB
/
ui-tests-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
name: Playwright Tests
on:
pull_request:
paths:
- 'frontend/src/**'
- 'frontend/*.json'
- 'frontend/*.js'
- 'frontend/*.ts'
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
DEV_PASSWORD: ${{ secrets.DEV_PASSWORD }}
API_BASE_URL: ${{ secrets.API_BASE_URL }}
working-directory: ./frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: frontend/yarn.lock
- name: Install dependencies
working-directory: frontend
run: yarn install --frozen-lockfile
- name: Install Playwright Browsers
run: yarn add [email protected] && yarn playwright install --with-deps
working-directory: ./frontend
- name: Create env file
run: |
cd frontend
touch .env
echo DEV_PASSWORD="${{ secrets.DEV_PASSWORD }}" >> .env
echo API_BASE_URL=${{ secrets.API_BASE_URL }} >> .env
cat .env
- name: Build frontend
run: cd frontend && yarn build
id: build-frontend
- name: Run Playwright tests
run: cd frontend && yarn playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: frontend/playwright-report/
retention-days: 30