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
|
2023-11-10 18:02:33 +00:00
|
|
|
CHROME_PATH = org.chrome.Chromium
|
|
|
|
CHROMEDRIVER_PATH = 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-08-12 07:00:05 +00:00
|
|
|
# We enable experimental web platform features so the Document-Policy header is enforced
|
|
|
|
# #
|
2023-12-13 02:24:11 +00:00
|
|
|
CHROME_FLAGS += --headless --disable-network-portal-notification --disable-client-side-phishing-protection --disable-gaia-services --disable-sync --no-vr-runtime --no-wifi --no-crash-upload --no-report-uload --disable-extensions --allow-browser-signin=false --no-default-browser-check --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-device-discovery-notifications --disable-domain-reliability --disable-fonts-googleapis-references --disable-field-trial-config --lang=en-US --disable-ntp-popular-sites --disable-offer-store-unmasked-wallet-cards --disable-office-editing-component-extension --disable-fine-grained-time-zone-detection --disable-background-timer-throttling --disable-breakpad --enable-blink-features=LayoutInstabilityAPI --enable-features=UseDnsHttpsSvcb,UseDnsHttpsSvcbAlpn,AsyncDns --no-first-run --disable-background-networking --user-data-dir=$(CHROME_PROFILE) --enable-experimental-web-platform-features --enable-quic --origin-to-force-quic-on=seirdy.one:443 --headless=new
|
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'
|
2023-11-10 18:02:33 +00:00
|
|
|
# When quiet, my lappie's CPU power is benchmarked to be a bit under 1000. The CPU throttling calculator recommends throttling by 2.3.
|
|
|
|
# Multiply that by 3 cuz imo it's way too generous. It targets devices like the Moto G4; I target devices like the JioPhone 2.
|
|
|
|
CPU_SLOWDOWN=6.9 # nice
|
|
|
|
LIGHTHOUSE_ARGS += --budget-path linter-configs/budget.json --output html --output json --output-file lighthouse-results --throttling-method=devtools --throttling.cpuSlowdownMultiplier=$(CPU_SLOWDOWN) --chrome-flags="$(CHROME_FLAGS)" --view
|
2020-12-22 00:46:27 +00:00
|
|
|
|
2022-08-09 04:34:58 +00:00
|
|
|
# make some of these quiet bc they'll otherwise echo every URL
|
|
|
|
|
2020-12-22 00:46:27 +00:00
|
|
|
hint-online:
|
2022-08-09 04:34:58 +00:00
|
|
|
@echo "Running webhint"
|
2023-11-24 02:40:01 +00:00
|
|
|
hint --config linter-configs/hintrc $(URLS)
|
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:
|
2022-08-09 04:34:58 +00:00
|
|
|
@echo "Running axe"
|
|
|
|
@axe $(URLS) --chrome-options $(CHROME_FLAGS_COMMA) --chromedriver-path=$(CHROMEDRIVER_PATH) --show-errors
|
2022-06-18 03:53:43 +00:00
|
|
|
axe-ff:
|
2022-08-09 04:34:58 +00:00
|
|
|
@echo "Running axe with Firefox"
|
2022-08-11 04:30:22 +00:00
|
|
|
@scripts/bin/axe-ff $(OUTPUT_DIR) $(URLS)
|
|
|
|
|
2023-11-24 02:40:01 +00:00
|
|
|
|
2022-07-18 03:01:54 +00:00
|
|
|
.PHONY: axe axe-ff
|
2022-06-18 05:09:32 +00:00
|
|
|
|
|
|
|
.PHONY: all-extra
|
2023-11-24 02:40:01 +00:00
|
|
|
all-extra: axe-ff equal-access lint-local
|
2020-12-22 00:46:27 +00:00
|
|
|
|