fixed unlighthouse 10

This commit is contained in:
Firq 2025-04-12 00:06:46 +02:00
parent 278befbb50
commit 215b803749
Signed by: Firq
GPG key ID: DCE182BA39C697B2
4 changed files with 5913 additions and 18 deletions

View file

@ -12,7 +12,7 @@ jobs:
unlighthouse: unlighthouse:
runs-on: docker runs-on: docker
container: container:
image: forgejo.neshweb.net/ci-docker-images/unlighthouse:0.4.1 image: forgejo.neshweb.net/ci-docker-images/unlighthouse:0.16.3
services: services:
website: website:
image: forgejo.neshweb.net/firq/firq-dev-website:${{ inputs.containertag }} image: forgejo.neshweb.net/firq/firq-dev-website:${{ inputs.containertag }}

5912
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{ {
"name": "@firq/fgosite", "name": "@firq/fgosite",
"type": "module", "type": "module",
"version": "0.2.0-pre.90", "version": "0.2.0-pre.91",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
@ -23,6 +23,9 @@
"postcss-preset-env": "^10.1.5", "postcss-preset-env": "^10.1.5",
"typescript": "^5.5.3" "typescript": "^5.5.3"
}, },
"devDependencies": {
"unlighthouse": "^0.16.3"
},
"browserslist": [ "browserslist": [
"last 2 versions", "last 2 versions",
">0.5% and not dead" ">0.5% and not dead"

View file

@ -1,4 +1,6 @@
export default async () => { import type { UserConfig } from 'unlighthouse'
export default async (): Promise<UserConfig> => {
/* fetch sitemap from debug container */ /* fetch sitemap from debug container */
const sitemap = await (await fetch('http://website:8081/sitemap-0.xml')).text(); const sitemap = await (await fetch('http://website:8081/sitemap-0.xml')).text();
/* format URLs to work with debug container */ /* format URLs to work with debug container */
@ -10,7 +12,6 @@ export default async () => {
/* actual config */ /* actual config */
return { return {
lighthouseOptions: { lighthouseOptions: {
cache: false,
throttlingMethod: 'devtools', throttlingMethod: 'devtools',
throttling: { throttling: {
cpuSlowdownMultiplier: 4, cpuSlowdownMultiplier: 4,
@ -22,10 +23,11 @@ export default async () => {
width: 412, width: 412,
height: 823, height: 823,
deviceScaleFactor: 1.75, deviceScaleFactor: 1.75,
} },
skipAudits: [ 'is-on-https', 'redirects-http', 'uses-http2' ],
}, },
puppeteerOptions: { puppeteerOptions: {
args: ['--no-sandbox', '--disable-setuid-sandbox'], args: [ '--no-sandbox', '--disable-setuid-sandbox' ],
}, },
puppeteerClusterOptions: { puppeteerClusterOptions: {
maxConcurrency: 1 maxConcurrency: 1
@ -33,7 +35,6 @@ export default async () => {
ci: { ci: {
budget: 50, budget: 50,
buildStatic: true, buildStatic: true,
skipAudits: ['is-on-https', 'redirects-http', 'uses-http2']
}, },
scanner: { scanner: {
sitemap: true, sitemap: true,
@ -41,6 +42,7 @@ export default async () => {
samples: 3, samples: 3,
}, },
outputPath: 'unlighthouse-reports', outputPath: 'unlighthouse-reports',
cache: false,
urls urls
} }
} }