Skip to content

Commit

Permalink
run Python 3.5 from a container
Browse files Browse the repository at this point in the history
the installation GH has is broken by now
  • Loading branch information
evgeni committed Jul 9, 2024
1 parent 847c7cb commit 73ab49e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions tests/test_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73ab49e

Please sign in to comment.