-
Notifications
You must be signed in to change notification settings - Fork 48
74 lines (69 loc) · 4.27 KB
/
lighthouse-performance.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
name: Lighthouse Performance
on:
pull_request:
branches: [develop, main]
jobs:
# vercel will deploy a preview branch and domain for this PR
# wait for new deployment to complete before running lighthouse
wait-for-vercel-deployment:
name: Wait for vercel deployment
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelDeployment.outputs.url }}
steps:
- name: Wait for Vercel preview deployment to be ready
uses: patrickedqvist/[email protected]
id: waitForVercelDeployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 1000
check_interval: 5
lighthouse-mobile:
runs-on: ubuntu-latest
needs: wait-for-vercel-deployment
steps:
- uses: actions/checkout@v3
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/activities
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/chat
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/grounding
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/notes
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/therapy
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves/the-social-context-of-image-based-abuse-and-victim-blaming
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships/emotional-boundaries
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships/introduction-and-what-you-should-know
budgetPath: ./lighthouse_budget.json # test performance budgets
uploadArtifacts: true # save results as an action artifacts
lighthouse-desktop:
runs-on: ubuntu-latest
needs: wait-for-vercel-deployment
steps:
- uses: actions/checkout@v3
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/activities
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/chat
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/grounding
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/notes
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/therapy
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves/the-social-context-of-image-based-abuse-and-victim-blaming
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships/emotional-boundaries
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships/introduction-and-what-you-should-know
budgetPath: ./lighthouse_desktop_budget.json # test performance budgets
uploadArtifacts: true # save results as an action artifacts
configPath: '.github/configs/lighthouse-desktop-rc.yml' # set lighthouse config