Skip to content

Commit

Permalink
Start testing 3006.x
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
  • Loading branch information
s0undt3ch committed Jul 26, 2023
1 parent c8c2e90 commit 7f228ef
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,24 @@ jobs:

strategy:
fail-fast: false
max-parallel: 9
max-parallel: 16
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
salt-version:
- "3005.0"
- "3006.0"
pytest-version:
- "7.0.0"
- "7.1.0"
exclude:
- {"python-version": "3.7", "salt-version": "3005.0"}
- {"python-version": "3.9", "salt-version": "3005.0"}
- {"python-version": "3.10", "salt-version": "3005.0"}
- {"python-version": "3.7", "salt-version": "3006.0"}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -275,18 +281,25 @@ jobs:

strategy:
fail-fast: false
max-parallel: 9
max-parallel: 16
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
salt-version:
- "3005.0"
- "3006.0"
pytest-version:
- "7.0.0"
- "7.1.0"
exclude:
- {"python-version": "3.7", "salt-version": "3005.0"}
- {"python-version": "3.8", "salt-version": "3005.0"}
- {"python-version": "3.10", "salt-version": "3005.0"}
- {"python-version": "3.7", "salt-version": "3006.0"}
- {"python-version": "3.8", "salt-version": "3006.0"}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -364,11 +377,15 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
salt-version:
- "3005.0"
- "3006.0"
pytest-version:
- "7.0.0"
- "7.1.0"
exclude:
- {"python-version": "3.10", "salt-version": "3005.0"}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .pylint-spelling-words
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ pytestshellutils
pytestsysstats
pythonic
pythonpath
pyyaml
pyzmq
qux
rc
Expand Down
11 changes: 10 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def session_run_always(session, *command, **kwargs):
session._runner.global_config.install_only = old_install_only_value


@nox.session(python=("3", "3.6", "3.7", "3.8", "3.9"))
@nox.session(python=("3", "3.6", "3.7", "3.8", "3.9", "3.10"))
def tests(session):
"""
Run tests.
Expand All @@ -132,6 +132,15 @@ def tests(session):
# Always have the wheel package installed
session.install("wheel", silent=PIP_INSTALL_SILENT)
session.install(COVERAGE_VERSION_REQUIREMENT, silent=PIP_INSTALL_SILENT)
if python_version_info >= (3, 10) and "3006" in SALT_REQUIREMENT:
# Workaround pyyaml issue https://github.com/yaml/pyyaml/issues/601
session.install(
"--progress-bar=off",
"Cython<3.0",
"--no-build-isolation",
SALT_REQUIREMENT,
silent=PIP_INSTALL_SILENT,
)
salt_requirements = []
if python_version_info <= (3, 7) and "3005" in SALT_REQUIREMENT:
salt_requirements.append("importlib-metadata<5.0.0")
Expand Down
9 changes: 7 additions & 2 deletions tests/scenarios/examples/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ def __enter__(self): # noqa: D105
self.venv.run("git", "init", ".")
self.venv.run("git", "add", ".")
self.venv.install(str(CODE_ROOT_DIR.parent.parent))
# Only Salt >= 3006 supports importlib-metadata>=5.0.0
self.venv.install("importlib-metadata<5.0.0", ".[tests]")

import salt.version # pylint: disable=import-outside-toplevel

if salt.version.__saltstack_version__ < "3006":
# Only Salt >= 3006 supports importlib-metadata>=5.0.0
self.venv.install("importlib-metadata<5.0.0")
self.venv.install(".[tests]")
return self.venv

def __exit__(self, *_): # noqa: D105
Expand Down

0 comments on commit 7f228ef

Please sign in to comment.