-
Notifications
You must be signed in to change notification settings - Fork 8
66 lines (66 loc) · 2.01 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Playwright Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: 'Dependency Review'
if: github.event_name == 'pull_request' && github.event.action != 'closed'
uses: actions/dependency-review-action@v3
- uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Install dependencies
run: npm ci
- name: 'Setup Hugo on Runner'
uses: peaceiris/actions-hugo@v2
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
workload_identity_provider: '${{ secrets.GH_GOOGLE_FED_PROVIDER }}'
service_account: '${{ secrets.GA_API_SERVICE_ACC_EMAIL}}'
- run: |
npm install @google-analytics/data
- uses: actions/github-script@v6
env:
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
with:
script: |
const script = require('.github/workflows/scripts/google-analytics.js')
await script({github, context, core})
- name: Install Playwright
run: npx playwright install --with-deps
- name: Setup generator dependencies
working-directory: tests/generator
run: npm install
- name: Run Hugo Server
run: hugo serve &
- name: Generate test data
run: |
node tests/generator/data-generator.js blog
node tests/generator/data-generator.js episode
node tests/generator/data-generator.js person
node tests/generator/data-generator.js talk
- name: Run Playwright tests
run: PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml npx playwright test
- name: Test Summary
if: always()
uses: test-summary/action@v2
with:
paths: |
tests/results.xml