1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 11:18:30 -04:00

run lighthouse tests on desktop instead of mobile

This commit is contained in:
Jake Jarvis 2021-06-11 23:51:43 -04:00
parent a1293c5a25
commit a2445d236d
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 14 additions and 10 deletions

View File

@ -18,10 +18,13 @@ jobs:
lfs: false lfs: false
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
with: with:
node-version: 14.x node-version: 12.x
- run: npm install -g @lhci/cli - uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install -g @lhci/cli
- run: | - run: |
lhci healthcheck chrome --version
lhci --version lhci --version
curl $LHCI_SERVER_BASE_URL/version curl $LHCI_SERVER_BASE_URL/version
echo "ref: ${{ github.event.deployment.ref }}" echo "ref: ${{ github.event.deployment.ref }}"
@ -30,7 +33,7 @@ jobs:
- if: github.event.deployment_status.environment == 'production' - if: github.event.deployment_status.environment == 'production'
continue-on-error: true continue-on-error: true
env: env:
BASE_URL: https://jarv.is/ BASE_URL: https://jarv.is
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: main LHCI_BUILD_CONTEXT__CURRENT_BRANCH: main
run: | run: |
lhci autorun \ lhci autorun \

View File

@ -1,20 +1,20 @@
{ {
"ci": { "ci": {
"collect": { "collect": {
"numberOfRuns": 3 "numberOfRuns": 3,
"settings": {
"preset": "desktop",
"chromeFlags": "--no-sandbox"
}
}, },
"assert": { "assert": {
"preset": "lighthouse:no-pwa", "preset": "lighthouse:no-pwa",
"assertions": { "assertions": {
"color-contrast": "warn", "color-contrast": "warn",
"csp-xss": "warn", "csp-xss": "warn",
"errors-in-console": "warn",
"inspector-issues": "warn",
"link-text": "warn", "link-text": "warn",
"long-tasks": "warn", "long-tasks": "warn",
"non-composited-animations": "warn",
"total-byte-weight": ["warn", {"minScore": 0.9}], "total-byte-weight": ["warn", {"minScore": 0.9}],
"unminified-javascript": "warn",
"unsized-images": "warn", "unsized-images": "warn",
"unused-css-rules": "warn", "unused-css-rules": "warn",
"unused-javascript": "warn", "unused-javascript": "warn",
@ -25,7 +25,8 @@
"uses-long-cache-ttl": "off", "uses-long-cache-ttl": "off",
"uses-responsive-images": "off", "uses-responsive-images": "off",
"uses-webp-images": "off" "uses-webp-images": "off"
} },
"includePassedAssertions": true
}, },
"upload": { "upload": {
"target": "lhci", "target": "lhci",