Skip to content

Instantly share code, notes, and snippets.

@nicobytes
Created October 29, 2020 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicobytes/5a037037b746228b01d757f753d19c38 to your computer and use it in GitHub Desktop.
Save nicobytes/5a037037b746228b01d757f753d19c38 to your computer and use it in GitHub Desktop.
Lighthouse CI
.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