diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b22f899f2c..95efeec053 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,7 @@ jobs: container: "python:2.7" - python: "3.5" ansible: "stable-2.11" + container: "python:3.5" - python: "3.6" ansible: "stable-2.11" - python: "3.7" diff --git a/tests/test_crud.py b/tests/test_crud.py index dcb4e7529a..9138921b42 100644 --- a/tests/test_crud.py +++ b/tests/test_crud.py @@ -52,8 +52,9 @@ def test_check_mode(tmpdir, module): @pytest.mark.parametrize('module', INVENTORY_PLAYBOOKS) def test_inventory(tmpdir, module): - if sys.version_info[0] == 2 and 'GITHUB_ACTIONS' in os.environ.keys(): - pytest.skip("Inventory tests currently don't work inside a container, but Python2 tests require a container on GHA.") + if sys.version_info < (3, 6) and 'GITHUB_ACTIONS' in os.environ.keys(): + pytest.skip("Inventory tests currently don't work inside a container, but Python {}.{} tests require a container on GHA." + .format(sys.version_info.major, sys.version_info.minor)) inventory = [os.path.join(os.getcwd(), 'tests', 'inventory', inv) for inv in ['hosts', "{}.foreman.yml".format(module)]] run = run_playbook(module, inventory=inventory) assert run.rc == 0