Test official Lighthouse CI action

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2019-11-19 19:54:41 +05:30
parent 23077e4c8a
commit c8f23a57bf
No known key found for this signature in database
GPG Key ID: C2E74282C2133D62
2 changed files with 42 additions and 7 deletions

View File

@ -48,13 +48,16 @@ jobs:
CF_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
CF_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
- name: Audit live URL
uses: docker://jakejarvis/lighthouse-action:latest
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v2
with:
url: 'https://msfjarvis.website/'
urls: |
https://msfjarvis.website/
https://staging.msfjarvis.website
budgetsPath: ./budgets.json
- name: Upload results as an artifact
uses: actions/upload-artifact@master
- name: Save results
uses: actions/upload-artifact@v1
with:
name: report
path: './report'
name: lighthouse-results
path: '.lighthouseci'

32
budgets.json Normal file
View File

@ -0,0 +1,32 @@
[
{
"resourceSizes": [
{
"resourceType": "script",
"budget": 300
},
{
"resourceType": "image",
"budget": 100
},
{
"resourceType": "third-party",
"budget": 200
},
{
"resourceType": "total",
"budget": 1000
}
],
"resourceCounts": [
{
"resourceType": "third-party",
"budget": 10
},
{
"resourceType": "total",
"budget": 50
}
]
}
]