-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (62 loc) · 1.66 KB
/
playwright-production-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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Playwright e2e Production Tests
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
defaults:
run:
working-directory: ./playwright
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
env:
HEALTH_URL: https://www.noteapp.co.uk/api/health
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Wake backend
run: curl -v --connect-timeout 120 -m 180 ${HEALTH_URL}
- name: Install Playwright
run: |
yarn
yarn playwright install chromium
- name: Run Playwright Tests against chromium
run: |
yarn test:production
- name: Upload Playwright Report to Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: ./playwright/playwright-report/
retention-days: 30
- name: Set up JDK for Allure
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Load test report history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: gh-pages
allure_history: allure-history
allure_results: ./playwright/allure-results
- name: Publish test report
uses: peaceiris/actions-gh-pages@v4
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history