2020-12-22 00:46:27 +00:00
|
|
|
# The following test the online instance, post-deploy. I just kept them here for convenience
|
|
|
|
|
2022-06-17 00:19:23 +00:00
|
|
|
include Makefile
|
2020-12-22 00:46:27 +00:00
|
|
|
DOMAIN = seirdy.one
|
|
|
|
PAGE_PATH = /
|
|
|
|
SCHEME=https://
|
2022-06-14 00:06:48 +00:00
|
|
|
URL ?= $(SCHEME)$(DOMAIN)$(PAGE_PATH)
|
2020-12-22 00:46:27 +00:00
|
|
|
# latest bleeding-edge chromium snapshot
|
2022-06-14 00:06:48 +00:00
|
|
|
CHROME_DIR = /home/rkumar/Downloads/gitclone/chromium/thorium/latest
|
|
|
|
CHROME_PATH = $(CHROME_DIR)/chrome
|
|
|
|
CHROMEDRIVER_PATH = $(CHROME_DIR)/chromedriver
|
2022-05-11 17:01:22 +00:00
|
|
|
CHROME_PROFILE ?= /tmp/chrome-lighthouse
|
2022-05-10 23:12:55 +00:00
|
|
|
JS_FLAGS=''
|
2022-07-16 00:19:46 +00:00
|
|
|
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
|
2022-06-14 00:06:48 +00:00
|
|
|
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'
|
2022-05-11 17:01:22 +00:00
|
|
|
CPU_SLOWDOWN=2.8
|
2022-07-16 00:19:46 +00:00
|
|
|
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)"
|
2020-12-22 00:46:27 +00:00
|
|
|
|
|
|
|
hint-online:
|
2022-05-11 17:01:22 +00:00
|
|
|
hint --config linter-configs/hintrc -f codeframe $(URL)
|
2020-12-22 00:46:27 +00:00
|
|
|
lighthouse:
|
|
|
|
mkdir -p $(CHROME_PROFILE)
|
2022-06-16 02:43:01 +00:00
|
|
|
CHROME_PATH=$(CHROME_PATH) CHROME_PROFILE=$(CHROME_PROFILE) JS_FLAGS='' lighthouse $(URLS) $(LIGHTHOUSE_ARGS)
|
2020-12-22 00:46:27 +00:00
|
|
|
rm -rf $(CHROME_PROFILE)
|
2020-12-23 02:11:19 +00:00
|
|
|
redbot:
|
|
|
|
redbot_cli -a $(URL)
|
2022-06-18 05:09:32 +00:00
|
|
|
.PHONY: hint-online lighthouse redbot
|
|
|
|
|
2022-06-14 00:06:48 +00:00
|
|
|
axe:
|
|
|
|
axe $(URLS) --chrome-options $(CHROME_FLAGS_COMMA) --chromedriver-path=$(CHROMEDRIVER_PATH) --show-errors
|
2022-06-18 03:53:43 +00:00
|
|
|
axe-ff:
|
|
|
|
PATH=scripts/bin:$(PATH) axe $(URLS) -b firefox --show-errors
|
2022-06-16 02:43:01 +00:00
|
|
|
equal-access:
|
|
|
|
@echo $(URLS) | tr ' ' '\n' >urls.txt
|
|
|
|
achecker --reportLevels violation,recommendation,potentialrecommendation urls.txt
|
|
|
|
rm urls.txt
|
2022-06-18 05:09:32 +00:00
|
|
|
.PHONY: axe axe-ff equal-access
|
|
|
|
|
|
|
|
.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
|
2020-12-22 00:46:27 +00:00
|
|
|
|
2022-06-18 05:09:32 +00:00
|
|
|
.PHONY: all-extra
|
2022-07-12 16:41:06 +00:00
|
|
|
all-extra: axe-ff htmltest validate-json equal-access htmlproofer lint-css validate-feeds
|
2020-12-22 00:46:27 +00:00
|
|
|
|