From 8bb7138a4c0a1ea6881032578bafaeaab60ee8a9 Mon Sep 17 00:00:00 2001 From: Lionel Hercot Date: Thu, 18 Jan 2024 13:07:26 -0800 Subject: [PATCH] [ignore] Force Ansible v2.14+ and update pipeline versions --- .github/workflows/ansible-test.yml | 21 +++++++++------------ .github/workflows/galaxy-importer.cfg | 2 +- README.md | 2 +- meta/runtime.yml | 2 +- tests/unit/compat/builtins.py | 13 ------------- tests/unit/mock/loader.py | 2 +- tests/unit/module_utils/test_aci.py | 2 -- 7 files changed, 13 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 53799a4ab..91bb1f3dd 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -7,7 +7,7 @@ on: # * is a special character in YAML so you have to quote this string - cron: '0 8 * * *' env: - python_version: 3.9 + python_version: '3.10' jobs: build: name: Build collection @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - ansible: [v2.9.27, v2.10.17, v2.11.12, v2.12.10, stable-2.13, stable-2.14] + ansible: [v2.14.13, v2.15.8, v2.16.2, stable-2.16] steps: - name: Check out code uses: actions/checkout@v3 @@ -65,8 +65,8 @@ jobs: with: python-version: ${{ env.python_version }} - - name: Install ansible-base (stable-2.14) - run: pip install https://github.com/ansible/ansible/archive/stable-2.14.tar.gz --disable-pip-version-check + - name: Install ansible-base (v2.15.8) + run: pip install https://github.com/ansible/ansible/archive/v2.15.8.tar.gz --disable-pip-version-check - name: Download migrated collection artifacts uses: actions/download-artifact@v3 @@ -107,7 +107,7 @@ jobs: strategy: fail-fast: false matrix: - ansible: [v2.9.27, v2.10.17, v2.11.12, v2.12.10, stable-2.13, stable-2.14] + ansible: [v2.14.13, v2.15.8, v2.16.2, stable-2.16] steps: - name: Set up Python ${{ env.python_version }} uses: actions/setup-python@v4 @@ -149,11 +149,8 @@ jobs: strategy: fail-fast: false matrix: - ansible: [v2.10.17, v2.11.12, v2.12.10, stable-2.13, stable-2.14] - python-version: [3.9] - include: - - ansible: v2.9.27 - python-version: 3.8 + ansible: [v2.14.13, v2.15.8, v2.16.2, stable-2.16] + python-version: ['3.10'] steps: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -198,8 +195,8 @@ jobs: with: python-version: ${{ env.python_version }} - - name: Install ansible-base (stable-2.13) - run: pip install https://github.com/ansible/ansible/archive/stable-2.13.tar.gz --disable-pip-version-check + - name: Install ansible-base (v2.15.8) + run: pip install https://github.com/ansible/ansible/archive/v2.15.8.tar.gz --disable-pip-version-check - name: Install coverage (v4.5.4) run: pip install coverage==4.5.4 diff --git a/.github/workflows/galaxy-importer.cfg b/.github/workflows/galaxy-importer.cfg index 631359cf4..7208e7c1e 100644 --- a/.github/workflows/galaxy-importer.cfg +++ b/.github/workflows/galaxy-importer.cfg @@ -1,6 +1,6 @@ [galaxy-importer] LOG_LEVEL_MAIN = INFO -RUN_FLAKE8 = True +RUN_FLAKE8 = False RUN_ANSIBLE_DOC = True RUN_ANSIBLE_LINT = True RUN_ANSIBLE_TEST = False diff --git a/README.md b/README.md index 4e5cdf6af..7ff6e85ea 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Modules supporting new features introduced in ACI API in specific ACI versions m *Note: This collection is not compatible with versions of Ansible before v2.8.* ## Requirements -Ansible v2.9 or newer +Ansible v2.14 or newer ## Install Ansible must be installed diff --git a/meta/runtime.yml b/meta/runtime.yml index 9dcf11ce2..db7457adf 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,5 +1,5 @@ --- -requires_ansible: '>=2.9.10' +requires_ansible: '>=2.14.0' action_groups: all: - aci_aaa_custom_privilege diff --git a/tests/unit/compat/builtins.py b/tests/unit/compat/builtins.py index bfc8adfbe..43f88203a 100644 --- a/tests/unit/compat/builtins.py +++ b/tests/unit/compat/builtins.py @@ -19,16 +19,3 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type - -# -# Compat for python2.7 -# - -# One unittest needs to import builtins via __import__() so we need to have -# the string that represents it -try: - import __builtin__ -except ImportError: - BUILTINS = "builtins" -else: - BUILTINS = "__builtin__" diff --git a/tests/unit/mock/loader.py b/tests/unit/mock/loader.py index 524870cfa..2caea2883 100644 --- a/tests/unit/mock/loader.py +++ b/tests/unit/mock/loader.py @@ -30,7 +30,7 @@ class DictDataLoader(DataLoader): def __init__(self, file_mapping=None): file_mapping = {} if file_mapping is None else file_mapping - assert type(file_mapping) == dict + assert isinstance(file_mapping, dict) super(DictDataLoader, self).__init__() diff --git a/tests/unit/module_utils/test_aci.py b/tests/unit/module_utils/test_aci.py index a1e07ed24..0305ee4c3 100644 --- a/tests/unit/module_utils/test_aci.py +++ b/tests/unit/module_utils/test_aci.py @@ -40,8 +40,6 @@ def __init__(self): try: from lxml import etree - if sys.version_info >= (2, 7): - from xmljson import cobra except ImportError: pytestmark = pytest.mark.skip("ACI Ansible modules require the lxml and xmljson Python libraries")