-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
129 lines (120 loc) · 2.78 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[tox]
envlist=lint
skipsdist=True
[galaxy-setup]
deps=
ansible-core
jinjanator
setenv=
TAG=main
ANSIBLE_COLLECTIONS_PATH={envtmpdir}/collections
commands_pre=
jinjanate -o src/galaxy.yml workflow-support/templates/galaxy.yml.j2
commands=
ansible-galaxy collection install -p {env:ANSIBLE_COLLECTIONS_PATH} src
[lint-base]
deps=
{[galaxy-setup]deps}
ruff>=0.2.0
ansible-lint
antsibull-docs
setenv=
{[galaxy-setup]setenv}
allowlist_externals=
bash
commands_pre=
{[galaxy-setup]commands_pre}
{[galaxy-setup]commands}
commands=
bash -c 'shellcheck workflow-support/*.sh'
bash -c 'mkdir {envtmpdir}/docs-build'
bash -c 'chmod g-w {envtmpdir}/docs-build'
antsibull-docs collection --fail-on-error --use-current --dest-dir {envtmpdir}/docs-build kpfleming.powerdns_auth
[testenv:lint-action]
deps=
{[lint-base]deps}
setenv=
{[lint-base]setenv}
allowlist_externals=
{[lint-base]allowlist_externals}
commands_pre=
{[lint-base]commands_pre}
{[lint-base]commands}
commands=
ruff format --check --diff src
ruff check --output-format=github src
ansible-lint --strict --profile production -v
[testenv:lint]
deps=
{[lint-base]deps}
setenv=
{[lint-base]setenv}
allowlist_externals=
{[lint-base]allowlist_externals}
commands_pre=
{[lint-base]commands_pre}
{[lint-base]commands}
commands=
ruff format src
ruff check --output-format=full --fix --show-fixes src
ansible-lint --fix all --strict --profile production -v
[testenv:py{39,310,311,312,313}-ci-action]
deps=
{[galaxy-setup]deps}
ansible-core
bravado
dnspython
jsonschema<4
swagger-spec-validator==2.6.0
setenv=
{[galaxy-setup]setenv}
passenv=
pdns_version
allowlist_externals=
bash
commands_pre=
{[galaxy-setup]commands_pre}
{[galaxy-setup]commands}
commands=
bash -c 'workflow-support/run_test_playbooks.sh'
[build-base]
deps=
{[galaxy-setup]deps}
commands_pre=
{[galaxy-setup]commands_pre}
commands=
ansible-galaxy collection build --force src
[testenv:build]
deps=
{[build-base]deps}
setenv=
TAG=main
commands=
{[build-base]commands_pre}
{[build-base]commands}
[testenv:make-tag]
deps=
{[build-base]deps}
passenv=
TAG
allowlist_externals=
git
bash
commands_pre=
{[build-base]commands_pre}
commands=
git add --force src/galaxy.yml
bash -c 'git commit -am "Prepare tag ${TAG}"'
bash -c 'git tag -a -m "Version ${TAG}" ${TAG}'
bash -c 'git push kpf ${TAG}'
git reset --hard HEAD~1
[testenv:publish-action]
deps=
{[build-base]deps}
passenv=
ANSIBLE_GALAXY_TOKEN
TAG
commands_pre=
{[build-base]commands}
commands=
ansible-galaxy collection publish --token {env:ANSIBLE_GALAXY_TOKEN} kpfleming-powerdns_auth-{env:TAG}.tar.gz