forked from devops-coop/ansible-minecraft
-
Notifications
You must be signed in to change notification settings - Fork 12
/
tox.ini
111 lines (98 loc) · 4.01 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# content of: tox.ini , put in same dir as setup.py
[pep8]
max-line-length = 120
[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
line_length = 120
known_first_party = tox,tests
known_third_party = pytest
[testenv:fix_lint]
basepython = python3.6
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
passenv = HOMEPATH
# without PROGRAMDATA cloning using git for Windows will fail with an
# `error setting certificate verify locations` error
PROGRAMDATA
extras = lint
deps = pre-commit == 1.10.3
skip_install = True
commands = pre-commit run --all-files --show-diff-on-failure
python -c 'import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'
[tox]
#envlist = fix_lint,docs,test-{debian,redhat}-{stretch,xenial}-{spigot,vanilla}-{latest,fixversion,oldversion}-{systemd},plugins
envlist = {debian,redhat}-{stretch,xenial,disco}-{spigot,vanilla}-{latest,fixversion,oldversion}
skipsdist=True
# execute molecule tests
[testenv]
setenv =
user_accept_minecraft_eula = {env:mc_accept_eula}
MOL_TESTINFRA_UNIT_REPORT = {envtmpdir}/molecule-report.xml
MOL_IMAGE ="jrei/systemd-debian:10"
#MOLECULE_GLOB = "./molecule/resources/molecule-maintenance-base.yml"
debian: DOCKER_CONFIG_FILE = ./molecule/resources/docker_debian.yml
redhat: DOCKER_CONFIG_FILE = ./molecule/resources/docker_redhat.yml
stretch: MOL_IMAGE ="jrei/systemd-debian:9"
stretch: DOCKER_CONFIG_FILE = ./molecule/resources/docker_debian_stretch.yml
buster: MOL_IMAGE ="jrei/systemd-debian:10"
bullseye: MOL_IMAGE ="jrei/systemd-debian:11"
trusty: MOL_IMAGE = "ubuntu:14.04"
xenial: MOL_IMAGE = "solita/ubuntu-systemd:16.04"
bionic: MOL_IMAGE = "solita/ubuntu-systemd:18.04"
focalFossa: MOL_IMAGE = "jrei/systemd-ubuntu:20.04"
twentyNine: MOL_IMAGE = "fedora:29"
thirtyFoure: MOL_IMAGE = "fedora:34"
thirtyThree: MOL_IMAGE = "fedora:33"
centos7: MOL_IMAGE = "centos:7"
centos8: MOL_IMAGE = "centos:8"
almalinux8: MOL_IMAGE = "almalinux:8"
almalinux9: MOL_IMAGE = "almalinux:9"
spigot: MC_SERVER_TYPE = spigot
spigot: MOL_TESTINFRA_ADDITIONAL_TESTS= "../tests_spigot/"
vanilla: MC_SERVER_TYPE = minecraft
vanilla: MOL_TESTINFRA_ADDITIONAL_TESTS= "../tests_vanilla/"
latest: MOL_TESTINFRA_ADDITIONAL_TESTS= ""
fixversion: MC_VERSION = "1.13.1"
oldversion: MC_VERSION = "1.9"
latest: MC_VERSION = "latest"
latest: JDK_VERSION = "17"
deps= -r{toxinidir}/requirementsDev.txt
commands =
molecule --base-config ./molecule/resources/molecule-maintenance-base.yml --env-file {env:DOCKER_CONFIG_FILE} test -s ci_single_container
[testenv:moldefault]
setenv =
user_accept_minecraft_eula={env:mc_accept_eula}
MOL_TESTINFRA_UNIT_REPORT={envtmpdir}/molecule-report.xml
MOL_IMAGE ="jrei/systemd-debian:10"
deps= -r{toxinidir}/requirementsDev.txt
commands =
molecule --base-config ./molecule/resources/molecule-maintenance-base.yml test -s ci_single_container
[testenv:plugins]
setenv =
user_accept_minecraft_eula={env:mc_accept_eula}
mc_accept_eula={env:mc_accept_eula}
MOL_TESTINFRA_UNIT_REPORT={envtmpdir}/molecule-report.xml
JDK_VERSION="11"
deps= -r{toxinidir}/requirementsDev.txt
commands =
molecule --env-file ./molecule/resources/envs-blanko.yml test -s spigot_with_plugins
[testenv:plugins_minimal_ansible]
setenv =
user_accept_minecraft_eula={env:mc_accept_eula}
mc_accept_eula={env:mc_accept_eula}
MOL_TESTINFRA_UNIT_REPORT={envtmpdir}/molecule-report.xml
deps= -r{toxinidir}/requirementsDev.txt
commands =
molecule --env-file ./molecule/resources/envs-blanko.yml test -s spigot_with_plugins
[testenv:release]
deps=
bumpversion
commands=
bumpversion --allow-dirty --no-commit major
# generate the sphinx doc
[testenv:docs]
changedir=docs
deps= -r{toxinidir}/requirementsDocs.txt
commands=
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html