Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gimbal to replace lighthousebot #28

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .gimbalrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Specify audits to run. Also include any plugins (like axe)
audits:
- axe
- size
- lighthouse
- heap-snapshot
- unused-source

configs:
comment:
# Only show failures in GitHub PR comments.
# Useful to pinpoint why a build has failed
onlyFailures: true

# Heap snapshot settings
heap-snapshot:
threshold:
Documents: 11
Frames: 5
JSHeapTotalSize: 13356000
JSHeapUsedSize: 10068000
Nodes: 800
RecalcStyleCount: 15
LayoutCount: 15

# Lighthouse settings
lighthouse:
skipAudits:
- uses-http2
- redirects-http
- uses-long-cache-ttl
- uses-text-compression
outputHtml: ./gimbal-artifacts/lighthouse.html
threshold:
accessibility: 95
"best-practices": 95
performance: 95
pwa: 95
seo: 95

# File and directory size settings
size:
- path: ./build/precache-*.js
maxSize: 10 KB
- path: ./build/static/js/[0-9]*.chunk.js
maxSize: 1 MB
- path: ./build/static/js/*.chunk.js
maxSize: 1 MB
- path: ./build/static/js/runtime*.js
maxSize: 10 KB
- path: ./build/index.html
maxSize: 10 KB
- path: ./build/favicon.ico
maxSize: 10 KB
- path: ./build/
maxSize: 18 MB

# Unused source settings
unused-source:
threshold:
- path: "**/*(private).*.chunk.css"
maxSize: 60%
- path: "**/!(private).*.chunk.css"
maxSize: 60%
- path: "**/*([0-9]).*.chunk.js"
maxSize: 90%
- path: "**/!([0-9]|main).*.chunk.js"
maxSize: 45%
- path: "**/(main).*.chunk.js"
maxSize: 50%

# Locations of reports. Useful for storing artifacts in CI
outputs:
# Only show failures in CLI
cli:
onlyFailures: true
html: ./gimbal-artifacts/results.html
json: ./gimbal-artifacts/results.json
markdown: ./gimbal-artifacts/results.md

# Plugins
plugins:
# Compare metrics to last-saved values
- plugin: "@modus/gimbal-plugin-last-value"
saveOnlyOnSuccess: false

# Save reports to a database. Needed for gimbal-plugin-last-value
- plugin: "@modus/gimbal-plugin-sqlite"
lastValue: true

# Axe a11y audits
- plugin: "@modus/gimbal-plugin-axe"
thresholds:
aria-allowed-attr: critical
color-contrast: serious
landmark-one-main: moderate
landmark-complementary-is-top-level: moderate
meta-viewport: critical
region: moderate
page-has-heading-one: moderate
scrollable-region-focusable: moderate
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
performance-artifacts/**

performance-artifacts/**

#Gimbal items
gimbal-artifacts/**
gimbal.db
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ git:
depth: 3
script:
- yarn build
after_success:
- sleep 4m
- yarn run lhbot https://website-ssr-pr-$TRAVIS_PULL_REQUEST.herokuapp.com/
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"aws-sync": "aws s3 sync ./build/ s3://aime-website/public --delete --acl public-read --content-encoding gzip",
"budget": "lighthouse --budget-path=./lighthouse-budget.json --output html --output-path ./performance-artifacts/budget-report.html --save-assets --view",
"audit": "lighthouse --config-path=lighthouse-config.js --output html --output-path ./performance-artifacts/audit-report.html --save-assets --view",
"lhbot": "lighthousebot -- --pwa=95 --perf=95 --seo=95 --a11y=95 --bp=95"
"gimbal-audit": "gimbal audit --config ./.gimbalrc.yml"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
Expand Down Expand Up @@ -110,7 +110,10 @@
]
},
"devDependencies": {
"lighthouse": "^5.4.0",
"lighthousebot": "git+https://github.com/GoogleChromeLabs/lighthousebot.git"
"@modus/gimbal": "^1.2.6",
"@modus/gimbal-plugin-axe": "^1.2.6",
"@modus/gimbal-plugin-last-value": "^1.2.6",
"@modus/gimbal-plugin-sqlite": "^1.2.6",
"lighthouse": "^5.4.0"
}
}
Loading