Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Improve testing (#18)
Browse files Browse the repository at this point in the history
* Updated dependencies

* Fixes testing

Assure we run with a tox version that can refresh deps and adds
failsafe test for expected number of tests to be run.
  • Loading branch information
ssbarnea authored Mar 24, 2021
1 parent ca042eb commit 472e48c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def pytest_collect_file(parent, path) -> Optional["Node"]:
return None
if lintable.kind == 'json-schema':
return SchemaFile.from_parent(parent, fspath=path) # type: ignore
if not lintable.kind:
return None
return YamlFile.from_parent(parent, fspath=path) # type: ignore


Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ setup_requires =

# These are required in actual runtime:
install_requires =
ansible>=3.0
ansible-lint>=5.0.2
ansible>=3.1.0
ansible-lint>=5.0.5
jsonschema>=3.2.0
packaging>=20.9
pydantic>=1.8.1
pytest>=6.2.2
pytest-plus>=0.2
pyyaml>=5.4.1
requests>=2.25.1
typing-extensions; python_version < "3.8"
Expand Down
2 changes: 1 addition & 1 deletion src/ansibleschemas/_modules.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tox]
minversion = 3.16.1
# v4 fixes issue around missing to refresh deps
minversion = 4.0.0a6
# py is before lint because it can alter tracked files
envlist = py,lint
isolated_build = true
Expand Down Expand Up @@ -28,6 +29,7 @@ passenv =
setenv =
PIP_DISABLE_PIP_VERSION_CHECK = 1
PRE_COMMIT_COLOR = always
PYTEST_REQPASS = 12 # number of tests we have
whitelist_externals =
sh
# We need develop (editable) because we rewrite our cached data.
Expand Down

0 comments on commit 472e48c

Please sign in to comment.