mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
build: restore old lighthouse-ci.yml cfg
This commit is contained in:
parent
cb4fa5d8ae
commit
cab1043a46
3 changed files with 95 additions and 93 deletions
88
.github/workflows/lighthouse-ci.yml
vendored
88
.github/workflows/lighthouse-ci.yml
vendored
|
|
@ -1,43 +1,45 @@
|
|||
#name: Lighthouse CI
|
||||
#on:
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - master
|
||||
# - main
|
||||
# workflow_dispatch:
|
||||
# inputs: {}
|
||||
# release:
|
||||
# types: [published]
|
||||
#
|
||||
#jobs:
|
||||
# lighthouse:
|
||||
# runs-on: ubuntu-latest
|
||||
# env:
|
||||
# UNSPLASH_KEY: ${{ secrets.UNSPLASH_KEY }}
|
||||
# UNSPLASH_CLIENT_ID: ${{ secrets.UNSPLASH_CLIENT_ID }}
|
||||
# steps:
|
||||
# - uses: actions/checkout@v5
|
||||
#
|
||||
# - uses: actions/setup-node@v5
|
||||
# with:
|
||||
# node-version: 20
|
||||
# cache: 'npm'
|
||||
#
|
||||
# - name: Install dependencies
|
||||
# run: npm i
|
||||
#
|
||||
# - run: npm run env # Generate env.generated.ts
|
||||
#
|
||||
# - name: Build production web app
|
||||
# run: npm run buildFrontend:prodWeb
|
||||
#
|
||||
# - name: Run Lighthouse CI
|
||||
# uses: treosh/lighthouse-ci-action@v12
|
||||
# with:
|
||||
# # Configure Lighthouse CI
|
||||
# configPath: './tools/lighthouse/.lighthouserc.json'
|
||||
# # Upload results to temporary storage
|
||||
# uploadArtifacts: true
|
||||
# temporaryPublicStorage: true
|
||||
# # Run 3 times for consistency
|
||||
# runs: 3
|
||||
name: Lighthouse CI
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs: {}
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
lighthouse:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
UNSPLASH_KEY: ${{ secrets.UNSPLASH_KEY }}
|
||||
UNSPLASH_CLIENT_ID: ${{ secrets.UNSPLASH_CLIENT_ID }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i
|
||||
|
||||
- run: npm run env # Generate env.generated.ts
|
||||
|
||||
- name: Build production web app
|
||||
run: npm run buildFrontend:prodWeb
|
||||
|
||||
- name: Run Lighthouse CI
|
||||
uses: treosh/lighthouse-ci-action@v12
|
||||
with:
|
||||
# Configure Lighthouse CI
|
||||
configPath: './tools/lighthouse/.lighthouserc.json'
|
||||
# Upload results to temporary storage
|
||||
uploadArtifacts: true
|
||||
temporaryPublicStorage: true
|
||||
# Run 3 times for consistency
|
||||
runs: 3
|
||||
# Configure budgets
|
||||
budgetPath: './tools/lighthouse/budget.json'
|
||||
|
|
|
|||
|
|
@ -3,56 +3,7 @@
|
|||
"collect": {
|
||||
"staticDistDir": "./dist",
|
||||
"numberOfRuns": 3,
|
||||
"url": ["/browser/index.html"],
|
||||
"budgets": [
|
||||
{
|
||||
"path": "/*",
|
||||
"resourceSizes": [
|
||||
{
|
||||
"resourceType": "script",
|
||||
"budget": 1200
|
||||
},
|
||||
{
|
||||
"resourceType": "stylesheet",
|
||||
"budget": 100
|
||||
},
|
||||
{
|
||||
"resourceType": "image",
|
||||
"budget": 300
|
||||
},
|
||||
{
|
||||
"resourceType": "font",
|
||||
"budget": 100
|
||||
},
|
||||
{
|
||||
"resourceType": "total",
|
||||
"budget": 1500
|
||||
}
|
||||
],
|
||||
"resourceCounts": [
|
||||
{
|
||||
"resourceType": "script",
|
||||
"budget": 100
|
||||
},
|
||||
{
|
||||
"resourceType": "stylesheet",
|
||||
"budget": 10
|
||||
},
|
||||
{
|
||||
"resourceType": "image",
|
||||
"budget": 50
|
||||
},
|
||||
{
|
||||
"resourceType": "font",
|
||||
"budget": 10
|
||||
},
|
||||
{
|
||||
"resourceType": "total",
|
||||
"budget": 150
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"url": ["http://localhost/browser/index.html"]
|
||||
},
|
||||
"assert": {
|
||||
"preset": "lighthouse:no-pwa",
|
||||
|
|
|
|||
49
tools/lighthouse/budget.json
Normal file
49
tools/lighthouse/budget.json
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
[
|
||||
{
|
||||
"path": "/*",
|
||||
"resourceSizes": [
|
||||
{
|
||||
"resourceType": "script",
|
||||
"budget": 1200
|
||||
},
|
||||
{
|
||||
"resourceType": "stylesheet",
|
||||
"budget": 100
|
||||
},
|
||||
{
|
||||
"resourceType": "image",
|
||||
"budget": 300
|
||||
},
|
||||
{
|
||||
"resourceType": "font",
|
||||
"budget": 100
|
||||
},
|
||||
{
|
||||
"resourceType": "total",
|
||||
"budget": 1500
|
||||
}
|
||||
],
|
||||
"resourceCounts": [
|
||||
{
|
||||
"resourceType": "script",
|
||||
"budget": 120
|
||||
},
|
||||
{
|
||||
"resourceType": "stylesheet",
|
||||
"budget": 10
|
||||
},
|
||||
{
|
||||
"resourceType": "image",
|
||||
"budget": 50
|
||||
},
|
||||
{
|
||||
"resourceType": "font",
|
||||
"budget": 10
|
||||
},
|
||||
{
|
||||
"resourceType": "total",
|
||||
"budget": 150
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue