-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (91 loc) · 2.7 KB
/
.e2e-admin.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
84
85
86
87
88
89
90
91
92
93
name: .E2E-Admin
env:
deployment_name: pay-transparency
on:
workflow_dispatch:
secrets:
ADMIN_E2E_TEST_LOGIN_USER_EMAIL:
required: true
ADMIN_E2E_TEST_LOGIN_PASSWORD:
required: true
ADMIN_E2E_TEST_LOGIN_OTP_SECRET:
required: true
inputs:
admin-frontend-url:
description: "URL of the admin frontend application"
required: true
type: string
environment:
description: "Environment to read secrets from GitHub secrets"
required: false
default: dev
type: string
timeout-minutes:
description: "Timeout minutes"
default: 8
required: false
type: number
workflow_call:
secrets:
ADMIN_E2E_TEST_LOGIN_USER_EMAIL:
required: true
ADMIN_E2E_TEST_LOGIN_PASSWORD:
required: true
ADMIN_E2E_TEST_LOGIN_OTP_SECRET:
required: true
inputs:
admin-frontend-url:
description: "URL of the admin frontend application"
required: true
type: string
environment:
description: "Environment to read secrets from GitHub secrets"
required: false
default: dev
type: string
timeout-minutes:
description: "Timeout minutes"
default: 8
required: false
type: number
jobs:
end-to-end:
name: Tests
environment: ${{ inputs.environment }}
defaults:
run:
working-directory: admin-frontend
runs-on: ubuntu-22.04
timeout-minutes: ${{ inputs.timeout-minutes }}
strategy:
max-parallel: 1
matrix:
project: [Google Chrome] # [chromium, Google Chrome, firefox, safari, Microsoft Edge]
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/setup-node@v4
name: Setup Node
with:
node-version: 20
- name: Install dependencies
run: |
npm ci
npx playwright install --with-deps
- name: Run Tests
env:
E2E_ADMIN_BASE_URL: ${{ inputs.admin-frontend-url }}
E2E_ADMIN_USERNAME: ${{ secrets.ADMIN_E2E_TEST_LOGIN_USER_EMAIL }}
E2E_ADMIN_PASSWORD: ${{ secrets.ADMIN_E2E_TEST_LOGIN_PASSWORD }}
E2E_ADMIN_TOTP_SECRET: ${{ secrets.ADMIN_E2E_TEST_LOGIN_OTP_SECRET }}
run: |
npx playwright test --project="${{ matrix.project }}" --reporter=html
- uses: actions/upload-artifact@v4
if: always()
name: upload results
env:
PW_TEST_HTML_REPORT_OPEN: always
with:
name: playwright-report-admin-frontend-${{ matrix.project }}
path: "./admin-frontend/playwright-report" # path from current folder
retention-days: 7