Created
October 29, 2020 22:46
-
-
Save nicobytes/5a037037b746228b01d757f753d19c38 to your computer and use it in GitHub Desktop.
Lighthouse CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.github/workflows/lighthouse-ci.yml | |
```yml | |
name: Lighthouse CI | |
on: [push] | |
jobs: | |
lhci: | |
name: Lighthouse CI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js 10.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 10.x | |
- name: run Lighthouse CI | |
run: | | |
npm install -g @lhci/cli@0.4.x | |
lhci autorun | |
``` | |
lighthouserc.js | |
``` | |
module.exports = { | |
ci: { | |
collect: { | |
staticDistDir: './public', | |
}, | |
assert: { | |
assertions: { | |
'categories:performance': ['warn', {minScore: .5}], | |
'categories:accessibility': ['error', {minScore: .5}] | |
} | |
}, | |
upload: { | |
target: 'temporary-public-storage', | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment