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

Initial push of lighthouse-ci & lighthous-ci-action #1259

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/lighthouse-ci-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# TODO: LIGHTHOUSE-CI-ACTION
name: Lighthouse CI
on: [push]

jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm install && npm install -g @lhci/cli@0.4.x
- run: npm run build
- run: lhci autorun --upload.target=temporary-public-storage
- name: Audit URL's using Lighthouse
uses: treosh/lighthouse-ci-action@v3
with:
node-version: 10.x
outputDirectory: /tmp/artifacts
urls: 'https://docsify.js.org/#/' # URL to audit using Lighthouse
budgetPath: .budget.json # test performance budgets
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload whitehouse report to the temporary storage
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: Lighthouse reports
path: /tmp/artifacts
62 changes: 62 additions & 0 deletions .github/workflows/lighthouse-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# TODO: LIGHTHOUSE-CI
# name: Lighthouse CI
# on: [push]

# jobs:
# lighthouse:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# - run: npm install && npm install -g @lhci/cli@0.4.x
# - run: npm run build
# - run: lhci autorun --upload.target=temporary-public-storage
# - name: Audit URL's using Lighthouse
# uses: treosh/lighthouse-ci-action@v3
# with:
# node-version: 10.x
# outputDirectory: /tmp/artifacts
# urls: 'https://docsify.js.org/#/' # URL to audit using Lighthouse
# budgetPath: .budget.json # test performance budgets
# uploadArtifacts: true # save results as an action artifacts
# temporaryPublicStorage: true # upload whitehouse report to the temporary storage
# - name: Upload artifacts
# uses: actions/upload-artifact@master
# with:
# name: Lighthouse reports
# path: /tmp/artifacts

name: Lighthouse CI

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
build:
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 13.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build
run: |
npm install
npm run build
- name: run Lighthouse CI
run: |
npm install -g @lhci/cli@0.4.x
lhci autorun
16 changes: 16 additions & 0 deletions budget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// TODO: LIGHTHOUSE-CI
[
{
"path": "/*",
"resourceSizes": [
{
"resourceType": "document",
"budget": 18
},
{
"resourceType": "total",
"budget": 200
}
]
}
]
8 changes: 8 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// TODO: LIGHTHOUSE-CI
module.exports = {
ci: {
upload: {
target: 'temporary-public-storage',
},
},
};