Merge pull request #184 from kremalicious/feature/lighthouse-ci

switch to new Lighthouse CI
This commit is contained in:
Matthias Kretschmann 2019-12-02 18:38:02 +01:00 committed by GitHub
commit 382b44e1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 3 deletions

View File

@ -80,3 +80,26 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
lighthouse:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Audit Beta using Lighthouse
if: success() && github.event_name == 'pull_request'
uses: treosh/lighthouse-ci-action@v2
with:
urls: 'https://beta.matthiaskretschmann.com'
configPath: './.github/workflows/lighthouserc.json'
temporaryPublicStorage: 'true'
- name: Audit Live using Lighthouse
if: success() && github.ref == 'refs/heads/master'
uses: treosh/lighthouse-ci-action@v2
with:
urls: 'https://matthiaskretschmann.com'
configPath: './.github/workflows/lighthouserc.json'
temporaryPublicStorage: 'true'

15
.github/workflows/lighthouserc.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"ci": {
"collect": {
"numberOfRuns": 3
},
"assert": {
"preset": "lighthouse:recommended",
"assertions": {
"font-display": "off",
"dom-size": "off",
"color-contrast": "off"
}
}
}
}

View File

@ -19,8 +19,7 @@
"test": "npm run lint && jest --coverage --silent",
"test:watch": "npm run lint && jest --coverage --watch",
"deploy": "./scripts/deploy.sh",
"new": "babel-node ./scripts/new.js",
"lh": "lighthousebot --pwa=90 --perf=90 --a11y=90 --bp=90 --seo 90 --runner=wpt"
"new": "babel-node ./scripts/new.js"
},
"dependencies": {
"@loadable/component": "^5.10.3",
@ -84,7 +83,6 @@
"jest": "^24.9.0",
"jest-canvas-mock": "^2.2.0",
"js-yaml": "^3.13.1",
"lighthousebot": "git+https://github.com/GoogleChromeLabs/lighthousebot.git",
"node-sass": "^4.13.0",
"ora": "^4.0.3",
"prepend": "^1.0.2",