-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
43 lines (40 loc) · 1.38 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[tox]
minversion = 1.6
envlist =
pre-commit
skipsdist = True
[testenv:jjb]
basepython = python3
deps =
jenkins-job-builder==3.5.0
commands =
jenkins-jobs -l DEBUG test --recursive -o {toxinidir}/archives/job-configs {toxinidir}/jjb:{toxinidir}/.jjb-test
[testenv:jjb-version]
basepython = python3
commands = python {toxinidir}/check_jjb_version.py
[testenv:pre-commit]
basepython = python3
allowlist_externals =
/bin/sh
deps =
pre-commit
passenv = HOME
commands =
pre-commit autoupdate
pre-commit run --all-files --show-diff-on-failure
/bin/sh -c 'if ! git config --get user.name > /dev/null; then \
git config --global --add user.name "CI"; \
touch .git/REMOVE_USERNAME; fi'
/bin/sh -c 'if ! git config --get user.email > /dev/null; then \
git config --global --add user.email "[email protected]"; \
touch .git/REMOVE_USEREMAIL; fi'
/bin/sh -c "if [ -f .git/COMMIT_EDITMSG ]; then \
cp .git/COMMIT_EDITMSG .git/COMMIT_MSGTOX; else \
git log HEAD -n1 --pretty=%B > .git/COMMIT_MSGTOX; fi"
/bin/sh -c "rm -f .git/COMMIT_MSGTOX"
/bin/sh -c "if [ -f .git/REMOVE_USERNAME ]; then \
git config --global --unset user.name; \
rm -f .git/REMOVE_USERNAME; fi"
/bin/sh -c "if [ -f .git/REMOVE_USEREMAIL ]; then \
git config --global --unset user.email; \
rm -f .git/REMOVE_USEREMAIL; fi"