-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
27 lines (24 loc) · 952 Bytes
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[tox]
envlist = docs
skipsdist = True
[testenv]
setenv =
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
PATH={toxinidir}/node_modules/.bin:{env:PATH}
passenv = CI HOME
[testenv:docs]
description = Build readthedocsext-theme documentation
changedir = {toxinidir}/docs
deps = .[docs]
commands =
sphinx-build -W --keep-going -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:lint]
description = run pre-commit to ensure the changes are valid against our lintings
deps =
pre-commit
commands =
# FIXME: use `github.event.pull_request.base.sha` in `--from-ref` because if
# the base branch is different, this won't work as expected
/bin/sh -c 'git diff --cached --quiet && pre-commit run --from-ref main --to-ref HEAD || pre-commit run'
/bin/sh -c 'git diff --cached --quiet && pre-commit run --config .pre-commit-config-local.yaml --from-ref main --to-ref HEAD || pre-commit run --config .pre-commit-config-local.yaml'