Skip to content

Commit acb9ae0

Browse files
authored
Adopt molecule config JSON schema (ansible#3668)
We move official location for Molecule Config JSON Schema inside molecule project itself. This will be followed by updates on JSON Schema Store and on vscode-ansible extension, and removal from ansible/schemas project. We already did the same with navigator and lint project, as it makes the maintenance easier.
1 parent ef88a8c commit acb9ae0

19 files changed

Lines changed: 3636 additions & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ pip-wheel-metadata
2323
docs/docstree
2424
.docker
2525
molecule/**
26+
tools/test-schema/node_modules

.pre-commit-config.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ ci:
33
skip:
44
# https://github.com/pre-commit-ci/issues/issues/55
55
- pip-compile
6+
- schema
67
default_language_version:
78
python: python3.8
89
repos:
10+
- repo: local
11+
hooks:
12+
- id: schema
13+
name: schema
14+
entry: bash -c "cd tools/test-schema && npm install && npm test"
15+
pass_filenames: false
16+
always_run: true
17+
language: node
918
- repo: https://github.com/pre-commit/mirrors-prettier
1019
# keep it before yamllint
1120
rev: "v3.0.0-alpha.0"
@@ -15,7 +24,8 @@ repos:
1524
exclude: >
1625
(?x)^(
1726
src/molecule/cookiecutter/.*|
18-
src/molecule/test/resources/templates/.*
27+
src/molecule/test/resources/templates/.*|
28+
tools/test-schema/(negative_test|test)/.*|
1929
)$
2030
additional_dependencies:
2131
- prettier
@@ -28,6 +38,10 @@ repos:
2838
rev: v2.2.1
2939
hooks:
3040
- id: codespell
41+
exclude: >
42+
(?x)^(
43+
tools/test-schema/package-lock.json
44+
)$
3145
- repo: https://github.com/PyCQA/isort
3246
rev: 5.10.1
3347
hooks:
@@ -104,9 +118,9 @@ repos:
104118
rev: 6.8.0
105119
hooks:
106120
- id: pip-compile
107-
entry: pip-compile -q --strip-extras --no-annotate --output-file=requirements.txt tools/opts.txt setup.cfg --extra docs --extra test --extra yamllint
121+
entry: pip-compile -q --strip-extras --no-annotate --output-file=requirements.txt tools/opts.txt setup.cfg --extra docs --extra test --extra lint
108122
- id: pip-compile
109123
name: pip-compile-upgrade
110-
entry: pip-compile -q --strip-extras -q --upgrade --no-annotate --output-file=requirements.txt tools/opts.txt setup.cfg --extra docs --extra test --extra yamllint
124+
entry: pip-compile -q --strip-extras -q --upgrade --no-annotate --output-file=requirements.txt tools/opts.txt setup.cfg --extra docs --extra test --extra lint
111125
files: ^(setup\.cfg|requirements.txt|constraints\.txt)$
112126
stages: [manual]

requirements.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile with python 3.8
33
# To update, run:
44
#
5-
# pip-compile --extra=docs --extra=test --extra=yamllint --no-annotate --output-file=requirements.txt --strip-extras setup.cfg tools/opts.txt
5+
# pip-compile --extra=docs --extra=lint --extra=test --no-annotate --output-file=requirements.txt --strip-extras setup.cfg tools/opts.txt
66
#
77
alabaster==0.7.12
88
ansi2html==1.8.0
@@ -15,19 +15,24 @@ babel==2.10.3
1515
binaryornot==0.4.4
1616
certifi==2022.6.15
1717
cffi==1.15.1
18+
cfgv==3.3.1
1819
chardet==5.0.0
1920
charset-normalizer==2.1.1
21+
check-jsonschema==0.18.3
2022
click==8.1.3
2123
click-help-colors==0.9.1
2224
commonmark==0.9.1
2325
cookiecutter==2.1.1
2426
coverage==6.4.4
2527
cryptography==37.0.4
28+
distlib==0.3.6
2629
distro==1.7.0
2730
docutils==0.17.1
2831
enrich==1.2.7
2932
execnet==1.9.0
3033
filelock==3.8.0
34+
flake8==5.0.4
35+
identify==2.5.5
3136
idna==3.3
3237
imagesize==1.4.1
3338
importlib-metadata==4.12.0
@@ -37,14 +42,21 @@ jinja2==3.1.2
3742
jinja2-time==0.2.0
3843
jsonschema==4.16.0
3944
markupsafe==2.1.1
45+
mccabe==0.7.0
4046
more-itertools==8.14.0
47+
nodeenv==1.7.0
4148
packaging==21.3
49+
pathspec==0.10.1
4250
pexpect==4.8.0
4351
pkgutil-resolve-name==1.3.10
52+
platformdirs==2.5.2
4453
pluggy==1.0.0
54+
pre-commit==2.20.0
4555
ptyprocess==0.7.0
4656
py==1.11.0
57+
pycodestyle==2.9.1
4758
pycparser==2.21
59+
pyflakes==2.5.0
4860
pygments==2.13.0
4961
pyparsing==3.0.9
5062
pyrsistent==0.18.1
@@ -64,6 +76,8 @@ pyyaml==6.0
6476
requests==2.28.1
6577
resolvelib==0.8.1
6678
rich==12.5.1
79+
ruamel-yaml==0.17.21
80+
ruamel-yaml-clib==0.2.6
6781
simplejson==3.17.6
6882
six==1.16.0
6983
snowballstemmer==2.2.0
@@ -79,7 +93,13 @@ sphinxcontrib-qthelp==1.0.3
7993
sphinxcontrib-serializinghtml==1.1.5
8094
subprocess-tee==0.3.5
8195
text-unidecode==1.3
96+
toml==0.10.2
8297
tomli==2.0.1
8398
typing-extensions==4.3.0
8499
urllib3==1.26.12
100+
virtualenv==20.16.5
101+
yamllint==1.28.0
85102
zipp==3.8.1
103+
104+
# The following packages are considered to be unsafe in a requirements file:
105+
# setuptools

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ test =
101101
pytest-xdist >= 2.1.0
102102
pytest >= 6.1.2
103103
lint =
104+
check-jsonschema >= 0.18.3
104105
flake8 >= 3.8.4
106+
jsonschema >= 4.16.0
105107
pre-commit >= 2.10.1
106108
yamllint
107109

0 commit comments

Comments
 (0)