From 9256f1717ccb84122fe40f0ff98fb308053ba282 Mon Sep 17 00:00:00 2001 From: Firq Date: Sat, 8 Jul 2023 22:51:07 +0200 Subject: [PATCH] trying unlighthouse --- .gitlab-ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b26e06..cbdc4a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - validate - build + - benchmark - deploy - post_deploy - scripts @@ -47,6 +48,24 @@ build-site: - public expire_in: 1 day +unlighthouse: + image: registry.gitlab.com/gitlab-ci-utils/lighthouse:latest + stage: benchmark + when: on_success + except: + - main + - tags + before_script: + - npm install @unlighthouse/cli puppeteer + - mkdir unlighthouse-reports + script: + - serve ./public/ > /dev/null 2>&1 & wait-on http://localhost:9101/ + - unlighthouse-ci http://localhost:3000 --site localhost:9101 --budget 75 --build-static --output-path ./unlighthouse-reports + artifacts: + paths: + - unlighthouse-reports + expire_in: 1 day + deploy-site: stage: deploy when: on_success