1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

CI: don't install packages globally

Install bins into ~/bin instead and use local npm packages
This commit is contained in:
Rohan Kumar 2020-12-23 17:12:40 -08:00
parent b48bd871a7
commit e989ff01c4
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 31 additions and 7 deletions

View file

@ -19,10 +19,11 @@ tasks:
- deps: | - deps: |
echo "StrictHostKeyChecking=no" >> ~/.ssh/config echo "StrictHostKeyChecking=no" >> ~/.ssh/config
rsync deploy@seirdy.one:/home/deploy/binaries.tar.gz . rsync deploy@seirdy.one:/home/deploy/binaries.tar.gz .
tar x -ozC /bin -f binaries.tar.gz mkdir -p ~/bin
npm i -g npm pnpm tar x -ozC ~/bin -f binaries.tar.gz
pnpm i -g @lhci/cli hint @hint/configuration-web-recommended @hint/hint-doctype @hint/hint-https-only @hint/hint-performance-budget @hint/formatter-codeframe
- build_deploy: | - build_deploy: |
cd seirdy.one cd seirdy.one
npm i -D
export PATH=~/bin:$PATH
make DOMAIN=staging.seirdy.one test-staging make DOMAIN=staging.seirdy.one test-staging
make clean deploy make clean deploy

5
.gitignore vendored
View file

@ -4,5 +4,6 @@ hint-report/
.hintrc-* .hintrc-*
*.report.html *.report.html
*.report.json *.report.json
.lighthouseci .lighthouseci/*
lighthouse-reports lighthouse-reports/*
node_modules/*

View file

@ -19,6 +19,7 @@ ci:
works-offline: "off" # not a PWA. Use caching. 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 timing-budget: "off" # buggy; manually use the below assertions instead
canonical: "off" # staging server doesn't have canonical
speed-index: speed-index:
- warn - warn
- maxNumericValue: 3000 - maxNumericValue: 3000

View file

@ -84,8 +84,8 @@ deploy: deploy-html deploy-gemini
## stuff for the staging server ## stuff for the staging server
.PHONY: test-staging .PHONY: test-staging
test-staging: deploy-html test-staging: deploy-html
yq e '.ci .collect .url | .[]' .lighthouserc.yml | xargs hint -f codeframe yq e '.ci .collect .url | .[]' .lighthouserc.yml | xargs npx hint -f codeframe
lhci autorun npx lhci autorun
.PHONY: all .PHONY: all
all: test deploy all: test deploy

21
package.json Normal file
View file

@ -0,0 +1,21 @@
{
"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",
"@hint/hint-doctype": "^3.3.7",
"@hint/hint-https-only": "^2.4.7",
"@hint/hint-performance-budget": "^2.4.7",
"@lhci/cli": "^0.6.1",
"hint": "^6.1.1"
}
}