From d8f6d1a913102591a55eb6e606dcf35aa3f814eb Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 23 Dec 2020 21:47:58 -0800 Subject: [PATCH] CI: save lighthouse artifacts --- .build.yml | 12 +++++++++--- .lighthouserc.yml | 8 ++++---- package.json | 10 ---------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.build.yml b/.build.yml index ac4cef2..e08e914 100644 --- a/.build.yml +++ b/.build.yml @@ -5,8 +5,10 @@ packages: - zopfli - git # for Hugo's gitInfo - make - - npm - - chromium + - npm # for testing with lighthouse and webhint + - chromium # for testing with lighthouse and webhint +environment: + HINT_TELEMETRY: off sources: - https://git.sr.ht/~seirdy/seirdy.one secrets: @@ -21,9 +23,13 @@ tasks: rsync deploy@seirdy.one:/home/deploy/binaries.tar.gz . mkdir -p ~/bin tar x -ozC ~/bin -f binaries.tar.gz - - build_deploy: | cd seirdy.one npm i -D + - build_deploy: | + cd seirdy.one export PATH=~/bin:$PATH make DOMAIN=staging.seirdy.one test-staging + tar czf ~/lighthouse-reports.tar.gz lighthouse-reports make clean deploy +artifacts: + - lighthouse-reports.tar.gz diff --git a/.lighthouserc.yml b/.lighthouserc.yml index cb35eda..6346270 100644 --- a/.lighthouserc.yml +++ b/.lighthouserc.yml @@ -17,9 +17,9 @@ ci: splash-screen: "off" # not a PWA themed-omnibox: "off" # antifeature, not a PWA works-offline: "off" # not a PWA. Use caching. - is-crawlable: "off" # staging server won't be indexed + is-crawlable: "off" # staging server won't be indexed timing-budget: "off" # buggy; manually use the below assertions instead - canonical: "off" # staging server doesn't have canonical + canonical: "off" # staging server doesn't have canonical speed-index: - warn - maxNumericValue: 3000 @@ -53,8 +53,8 @@ ci: - https://staging.seirdy.one/ - https://staging.seirdy.one/about.html - https://staging.seirdy.one/2020/11/23/website-best-practices.html - numberOfRuns: 5 + numberOfRuns: 3 upload: outputDir: lighthouse-reports - reportFilenamePattern: lighthouse-report-%%DATE%%.%%EXTENSION%% + reportFilenamePattern: lighthouse-report-%%PATHNAME%%.%%EXTENSION%% target: filesystem diff --git a/package.json b/package.json index 15a7c86..438e23c 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,4 @@ { - "name": "seirdy.one", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git@git.sr.ht:~seirdy/seirdy.one" - }, - "author": "", - "license": "MIT", "devDependencies": { "@hint/configuration-web-recommended": "^8.1.0", "@hint/formatter-codeframe": "^3.1.19",