From f0eaf3432342acde37f47375fdf6ae361b07e588 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Mon, 19 Feb 2024 11:15:50 +0100 Subject: [PATCH] fix: use devdep --- .github/workflows/unlighthouse.yaml | 4 ++-- package.json | 3 ++- unlighthouse.config.ts | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unlighthouse.yaml b/.github/workflows/unlighthouse.yaml index 454a201..fca31d5 100644 --- a/.github/workflows/unlighthouse.yaml +++ b/.github/workflows/unlighthouse.yaml @@ -74,7 +74,7 @@ jobs: timeout: 360 - name: Install Dependencies - run: pnpm install -g @unlighthouse/cli puppeteer + run: pnpm install - name: Run Unlighthouse run: | @@ -85,7 +85,7 @@ jobs: -F "password=${{ secrets.TEST_USER_PASSWORD }}" \ --verbose 2>&1 | awk -F'pb_auth=' '/pb_auth/{print $2;exit}' | awk -F';' '{print $1}') - unlighthouse-ci + pnpm run unlighthouse - name: Upload report to Cloudflare pages uses: cloudflare/wrangler-action@v3.4.1 diff --git a/package.json b/package.json index 36b9d42..deac9fa 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "lint": "prettier --check . && eslint .", - "format": "prettier --write ." + "format": "prettier --write .", + "unlighthouse": "unlighthouse-ci" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.0.0", diff --git a/unlighthouse.config.ts b/unlighthouse.config.ts index 9150d32..a7c6286 100644 --- a/unlighthouse.config.ts +++ b/unlighthouse.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'unlighthouse'; export default defineConfig({ - site: process.env.SITE_URL || 'http://localhost:5173/', + site: process.env.SCAN_URL || 'http://localhost:5173/', scanner: { samples: 1, throttle: true @@ -10,7 +10,7 @@ export default defineConfig({ { name: 'pb_auth', value: process.env.AUTH_COOKIE || '', - domain: 'localhost', + domain: process.env.SCAN_URL || 'http://localhost:5173/', path: '/', sameSite: 'Lax' }