generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (51 loc) · 1.45 KB
/
.tests.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
name: .Tests
on:
workflow_call:
inputs:
### Required
target:
description: PR number, test or prod
required: true
type: string
env:
DOMAIN: apps.silver.devops.gov.bc.ca
PREFIX: ${{ github.event.repository.name }}-${{ inputs.target }}
jobs:
e2e-tests:
name: E2E
defaults:
run:
working-directory: frontend
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
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
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: |
npm ci
npx playwright install --with-deps
- name: Run Tests
env:
E2E_BASE_URL: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}/
CI: 'true'
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