Skip to content

Commit

Permalink
Merge pull request #48 from nisshii0313/lighthouse_ci
Browse files Browse the repository at this point in the history
add to actions
  • Loading branch information
nisshii0313 committed Jan 2, 2020
2 parents d7454cf + 5190174 commit 0e23628
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lighthouse.yml
@@ -0,0 +1,20 @@
name: Build project and Run Lighthouse CI
on: [push]
jobs:
lhci:
name: Lighthouse CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install, build
run: |
npm install
npm run build
- name: run Lighthouse CI
run: |
npm install -g @lhci/cli@0.3.x
lhci autorun --config=./.lighthouserc.json
24 changes: 24 additions & 0 deletions .lighthouserc.json
@@ -0,0 +1,24 @@
{
"ci": {
"collect": {
"numberOfRuns": 3,
"startServerCommand": "npm run start",
"url": [
"http://localhost:3000/",
"http://localhost:3000/skills/",
"http://localhost:3000/history/",
"http://localhost:3000/inspire/"
]
},
"assert": {
"assertions": {
"offscreen-images": "off",
"uses-webp-images": "off",
"first-contentful-paint": ["error", {"maxNumericValue": 10000}]
}
},
"upload": {
"target": "temporary-public-storage"
}
}
}

0 comments on commit 0e23628

Please sign in to comment.