-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 2.2 KB
/
lighthouse.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
name: lighthouse
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
wait-for-vercel-deployment:
runs-on: ubuntu-18.04
steps:
- name: Get deployment URL
id: deployment
uses: schoenwaldnils/get-deployment-url@master
timeout-minutes: 10
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: UnlyEd/[email protected]
id: await-vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
with:
deployment-url: ${{ steps.deployment.outputs.deployment }}
timeout: 600 # Wait for 10 minutes before failing
- name: Display deployment status
run: 'echo The deployment at ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).url }} is ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).readyState }}'
lighthouse-check:
runs-on: ubuntu-latest
needs: [wait-for-vercel-deployment]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get deployment URL
id: deployment
uses: dorshinar/get-deployment-url@master
timeout-minutes: 5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Lighthouse
uses: foo-software/[email protected]
id: lighthouseCheck
with:
accessToken: ${{ secrets.GITHUB_TOKEN }}
author: ${{ github.actor }}
awsBucket: ${{ secrets.AWS_S3_BUCKET_LIGHTHOUSE }}
awsRegion: 'eu-central-1'
awsAccessKeyId: ${{ secrets.AWS_ACCESS_KEY_ID }}
awsSecretAccessKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
branch: ${{ github.ref }}
urls: ${{ steps.deployment.outputs.deployment }}
sha: ${{ github.sha }}
- name: Handle Lighthouse Check results
uses: foo-software/lighthouse-check-status-action@master
with:
lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
minAccessibilityScore: '90'
minBestPracticesScore: '50'
minPerformanceScore: '70'
minProgressiveWebAppScore: '50'
minSeoScore: '50'