2020-05-07 03:50:42 +02:00
|
|
|
[tox]
|
2022-07-27 19:14:03 +02:00
|
|
|
minversion = 3.18
|
|
|
|
envlist = build
|
2020-05-07 03:50:42 +02:00
|
|
|
skipsdist = true
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
deps =
|
|
|
|
lektor
|
2022-07-27 19:14:03 +02:00
|
|
|
setenv =
|
|
|
|
# Keep Lektor's private package cache in tox env rather than ~/.cache
|
|
|
|
XDG_CACHE_HOME = {envdir}/cache
|
|
|
|
LOCALAPPDATA = {envdir}/cache
|
|
|
|
|
|
|
|
[testenv:build]
|
|
|
|
commands =
|
2022-12-17 08:17:16 +01:00
|
|
|
lektor build -f webpack -O {envdir}/output
|
2022-07-27 19:14:03 +02:00
|
|
|
|
|
|
|
[testenv:htmltest]
|
|
|
|
# Build site and check links with htmltest
|
|
|
|
#
|
|
|
|
# By default, only internal links are checked.
|
|
|
|
#
|
|
|
|
# tox -e htmltest
|
|
|
|
#
|
|
|
|
# To test external links as well, try (warning: slow):
|
|
|
|
#
|
|
|
|
# HTMLTEST_OPTS="" tox -e htmltest
|
|
|
|
#
|
|
|
|
allowlist_externals =
|
|
|
|
bash
|
|
|
|
commands_pre =
|
|
|
|
# Install latest version of htmltest in the tox env
|
|
|
|
bash -c '[ -f {envbindir}/htmltest ] || \
|
|
|
|
curl -s https://htmltest.wjdp.uk | bash -s -- -b {envbindir}'
|
2020-05-07 03:50:42 +02:00
|
|
|
commands =
|
2022-07-27 19:14:03 +02:00
|
|
|
{[testenv:build]commands}
|
|
|
|
htmltest -c .htmltest.yml {env:HTMLTEST_OPTS:-s} {envdir}/output
|