1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00
seirdy.one/Makefile.online
Rohan Kumar c0904f3b32
Moar site testing
- Replace achecker flags with a config file
- Bring back webhint
- Amend check-whole-site so that it will deploy to staging if all checks
  pass, and then run webhint on every staging page.
2022-07-17 20:01:54 -07:00

46 lines
2.4 KiB
Makefile

# The following test the online instance, post-deploy. I just kept them here for convenience
include Makefile
DOMAIN = seirdy.one
PAGE_PATH = /
SCHEME=https://
URL ?= $(SCHEME)$(DOMAIN)$(PAGE_PATH)
# latest bleeding-edge chromium snapshot
CHROME_DIR = /home/rkumar/Downloads/gitclone/chromium/thorium/latest
CHROME_PATH = $(CHROME_DIR)/chrome
CHROMEDRIVER_PATH = $(CHROME_DIR)/chromedriver
CHROME_PROFILE ?= /tmp/chrome-lighthouse
JS_FLAGS=''
CHROME_FLAGS += --disable-extensions --no-default-browser-check --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-device-discovery-notifications --disable-domain-reliability --disable-background-timer-throttling --disable-breakpad --enable-blink-features=LayoutInstabilityAPI --no-first-run --disable-background-networking --user-data-dir=$(CHROME_PROFILE) --enable-quic --start-in-incognito --origin-to-force-quic-on=$(DOMAIN):443
CHROME_FLAGS_COMMA = 'disable-extensions,no-default-browser-check,disable-client-side-phishing-detection,disable-component-update,disable-default-apps,disable-device-discovery-notifications,disable-domain-reliability,disable-background-timer-throttling,disable-breakpad,no-first-run,disable-background-networking,js-flags=--jitless'
CPU_SLOWDOWN=2.8
LIGHTHOUSE_ARGS += --view --budget-path linter-configs/budget.json --output html --output json --output-file lighthouse-results --throttling.cpuSlowdownMultiplier=$(CPU_SLOWDOWN) --chrome-flags="$(CHROME_FLAGS)"
hint-online:
hint --config linter-configs/hintrc $(URLS)
lighthouse:
mkdir -p $(CHROME_PROFILE)
CHROME_PATH=$(CHROME_PATH) CHROME_PROFILE=$(CHROME_PROFILE) JS_FLAGS='' lighthouse $(URLS) $(LIGHTHOUSE_ARGS)
rm -rf $(CHROME_PROFILE)
redbot:
redbot_cli -a $(URL)
.PHONY: hint-online lighthouse redbot
axe:
axe $(URLS) --chrome-options $(CHROME_FLAGS_COMMA) --chromedriver-path=$(CHROMEDRIVER_PATH) --show-errors
axe-ff:
PATH=scripts/bin:$(PATH) axe $(URLS) -b firefox --show-errors
.PHONY: axe axe-ff
.validate-feed-main:
scripts/bin/validate-feed $(HUGO_BASEURL)atom.xml
.validate-feed-posts:
scripts/bin/validate-feed $(HUGO_BASEURL)posts/atom.xml
.validate-feed-notes:
scripts/bin/validate-feed $(HUGO_BASEURL)notes/atom.xml
validate-feeds: .validate-feed-main .validate-feed-posts .validate-feed-notes
.PHONY: validate-feeds .validate-feed-main .validate-feed-posts .validate-feed-notes
.PHONY: all-extra
all-extra: axe-ff htmltest validate-json equal-access htmlproofer lint-css validate-feeds