Compare commits

...

2 Commits

Author SHA1 Message Date
c270b631dd ci(lighthouse): add local lighthouse audit
All checks were successful
Portfolio/pipeline/head This commit looks good
2026-01-12 10:23:42 +01:00
530fed2f7b chore(git): ignore .vscode folder 2026-01-12 10:18:45 +01:00
5 changed files with 43 additions and 15 deletions

7
.gitignore vendored
View File

@@ -5,6 +5,7 @@ dist/
# dependencies
node_modules/
.pnpm-store/
# logs
npm-debug.log*
@@ -22,3 +23,9 @@ pnpm-debug.log*
# jetbrains setting folder
.idea/
# vscode
.vscode/
# Lighthouse CI reports
.lighthouseci/

22
.lighthouserc.cjs Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
ci: {
collect: {
staticDistDir: '/app/dist',
settings: {
chromeFlags: '--no-sandbox --disable-setuid-sandbox --headless=new --disable-gpu --disable-dev-shm-usage',
},
numberOfRuns: 1
},
assert: {
assertions: {
'categories:performance': ['error', {minScore: 0.9}],
'categories:accessibility': ['error', {minScore: 0.9}],
'categories:best-practices': ['error', {minScore: 0.9}],
'categories:seo': ['error', {minScore: 0.9}],
},
},
upload: {
target: 'temporary-public-storage',
},
},
};

View File

@@ -1,4 +0,0 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}

11
.vscode/launch.json vendored
View File

@@ -1,11 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}

14
local-lighthouse.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
mkdir -p ./.lighthouseci
docker run --rm \
--user 0:0 \
-v ./dist:/app/dist \
-v ./.lighthouserc.cjs:/app/.lighthouserc.cjs \
-v ./.lighthouseci:/app/.lighthouseci \
-w /app \
-e CHROME_PATH=/usr/bin/chromium-browser \
zenika/alpine-chrome:with-node \
npx @lhci/cli@0.15.x collect \
--config=/app/.lighthouserc.cjs