Skip to content

Commit 5801fa7

Browse files
committed
Adopt molecule config JSON schema
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 5801fa7

19 files changed

Lines changed: 3614 additions & 3 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ certifi==2022.6.15
1717
cffi==1.15.1
1818
chardet==5.0.0
1919
charset-normalizer==2.1.1
20+
check-jsonschema==0.18.3
2021
click==8.1.3
2122
click-help-colors==0.9.1
2223
commonmark==0.9.1

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)