From 759464ade51aba3f759862ebf2b0a56ce292c648 Mon Sep 17 00:00:00 2001 From: Gabriel Kimbio Date: Sun, 10 May 2026 03:27:39 +0300 Subject: [PATCH 1/3] Add lighthouse CI and perfomance budget configuration --- .github/workflows/lighthouse.yml | 15 +++++++++++++++ .lighthouserc.js | 24 ++++++++++++++++++++++++ next-env.d.ts | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lighthouse.yml create mode 100644 .lighthouserc.js diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 0000000..6e8d12a --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,15 @@ +name: Lighthouse CI +on: [push, pull_request] +jobs: + lighthouse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + - run: npm install + - run: npm run build + - name: run Lighthouse CI + run: npx @lhci/cli autorun diff --git a/.lighthouserc.js b/.lighthouserc.js new file mode 100644 index 0000000..e1b1e71 --- /dev/null +++ b/.lighthouserc.js @@ -0,0 +1,24 @@ +module.exports = { + ci: { + collect: { + startServerCommand: 'npm run start', + url: ['http://localhost:3000'], + numberOfRuns: 3, + settings: { + chromeFlags: '--no-sandbox --disable-setuid-sandbox --headless', + }, + }, + assert: { + assertions: { + 'categories:performance': ['warn', {minScore: 0.9}], + 'categories:accessibility': ['error', {minScore: 0.95}], + 'first-contentful-paint': ['warn', {maxNumericValue: 2000}], + 'interactive': ['error', {maxNumericValue: 3500}], + 'resource-summary:mainthread-work-breakdown:total': ['warn', {maxNumericValue: 5000}], + }, + }, + upload: { + target: 'temporary-public-storage', + }, + }, +}; diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. From a67592a413fc588707b82f55083b3caa51956b1c Mon Sep 17 00:00:00 2001 From: Gabriel Kimbio Date: Sun, 10 May 2026 04:42:27 +0300 Subject: [PATCH 2/3] fix: lighthouse assertion syntax --- .lighthouserc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lighthouserc.js b/.lighthouserc.js index e1b1e71..730da79 100644 --- a/.lighthouserc.js +++ b/.lighthouserc.js @@ -14,7 +14,7 @@ module.exports = { 'categories:accessibility': ['error', {minScore: 0.95}], 'first-contentful-paint': ['warn', {maxNumericValue: 2000}], 'interactive': ['error', {maxNumericValue: 3500}], - 'resource-summary:mainthread-work-breakdown:total': ['warn', {maxNumericValue: 5000}], + 'mainthread-work-breakdown:total': ['warn', {maxNumericValue: 5000}], }, }, upload: { From e07602b1f3faf97855d10956559737f75b7595a9 Mon Sep 17 00:00:00 2001 From: Gabriel Kimbio Date: Sat, 23 May 2026 01:43:34 +0300 Subject: [PATCH 3/3] revert: manual changes in next-env.d.ts --- next-env.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next-env.d.ts b/next-env.d.ts index 9edff1c..c4b7818 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.