-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (100 loc) · 2.88 KB
/
.e2e.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
94
95
96
97
98
99
100
101
102
name: .E2E
env:
deployment_name: pay-transparency
on:
workflow_dispatch:
secrets:
E2E_USERNAME:
required: true
E2E_PASSWORD:
required: true
EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY:
required: true
inputs:
frontend-url:
description: "Frontend URL of the application"
required: true
type: string
external-api-base-url :
description: "Base URL to the external service API"
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:
E2E_USERNAME:
required: true
E2E_PASSWORD:
required: true
EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY:
required: true
inputs:
frontend-url:
description: "Frontend URL of the application"
required: true
type: string
environment:
description: "Environment to read secrets from GitHub secrets"
required: false
default: dev
type: string
external-api-base-url :
description: "Base URL to the external service API"
required: true
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: frontend
runs-on: ubuntu-22.04
timeout-minutes: ${{ fromJson(inputs.timeout-minutes) }}
strategy:
max-parallel: 3
matrix:
project: [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_BASE_URL: ${{ inputs.frontend-url }}
E2E_USERNAME: ${{ secrets.E2E_USERNAME }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY: ${{ secrets.EXTERNAL_CONSUMER_DELETE_REPORTS_API_KEY }}
EXTERNAL_API_BASE_URL: ${{ inputs.external-api-base-url }}
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-${{ matrix.project }}
path: "./frontend/playwright-report" # path from current folder
retention-days: 7