Skip to content

Commit

Permalink
fix: split PR vs prod lhci configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivelin committed May 15, 2020
1 parent ad55887 commit 6e05bdd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
File renamed without changes.
16 changes: 16 additions & 0 deletions .github/lighthouse/lighthouserc-netlify-prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"ci": {
"collect": {
"numberOfRuns": 3
},
"assert": {
"preset": "lighthouse:no-pwa",
"assertions": {
"first-contentful-paint": ["warn", { "minScore": 0.6 }],
"font-display": "off",
"unused-css-rules": "off",
"uses-rel-preconnect": "off",
}
}
}
}
14 changes: 11 additions & 3 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ jobs:
id: get-netlify-url
with:
site_name: "ambianic-pwa-dist"
- name: Run Lighthouse PWA check against Netlify deployment
- name: Run Lighthouse PWA check against Netlify PR Preview
uses: treosh/lighthouse-ci-action@v2
with:
urls: |
https://ui.ambianic.ai
${{ steps.get-netlify-url.outputs.url }}
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
# budgetPath: '.github/lighthouse/budget.json' # performance budgets
configPath: '.github/lighthouse/lighthouserc.json' # PWA checks
configPath: '.github/lighthouse/lighthouserc-netlify-preview.json' # PWA checks
- name: Run Lighthouse PWA sanity check against Netlify production deployment
uses: treosh/lighthouse-ci-action@v2
with:
urls: |
https://ui.ambianic.ai
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
# budgetPath: '.github/lighthouse/budget.json' # performance budgets
configPath: '.github/lighthouse/lighthouserc-netlify-prod.json' # PWA checks

0 comments on commit 6e05bdd

Please sign in to comment.