1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 17:23:22 +01:00

switch to new Lighthouse CI

This commit is contained in:
Matthias Kretschmann 2019-11-12 00:05:54 +01:00
parent a3331b0581
commit a8f81cd128
Signed by: m
GPG Key ID: 606EEEF3C479A91F
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",