From 1a761c91395f3f2cb4e8ed61d953852fdf472bff Mon Sep 17 00:00:00 2001 From: Carl Buchmann Date: Fri, 19 Jul 2024 13:30:57 -0400 Subject: [PATCH] CI: Update and fix dev requirements (#702) --- .github/workflows/pull-request-management.yml | 9 ++++---- ansible_collections/arista/cvp/index.md | 2 +- .../arista/cvp/meta/runtime.yml | 2 +- .../arista/cvp/requirements-dev-pytest.txt | 22 +++++++++++++++++++ .../arista/cvp/requirements-dev.txt | 4 ++-- 5 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 ansible_collections/arista/cvp/requirements-dev-pytest.txt diff --git a/.github/workflows/pull-request-management.yml b/.github/workflows/pull-request-management.yml index f0cc6ab9e..c48927424 100644 --- a/.github/workflows/pull-request-management.yml +++ b/.github/workflows/pull-request-management.yml @@ -88,7 +88,7 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.10' - name: Install requirements run: | pip install -r ansible_collections/arista/cvp/requirements-dev.txt --upgrade @@ -130,7 +130,7 @@ jobs: strategy: fail-fast: true matrix: - python_version: ['3.9','3.10','3.11'] + python_version: ['3.9','3.10','3.11','3.12'] steps: - name: 'set environment variables' run: | @@ -142,8 +142,9 @@ jobs: with: python-version: ${{ matrix.python_version }} - name: Install requirements + # Removing ansible-lint in requirement-dev-3.9 to allow requirements installation for Python 3.9. run: | - pip install -r ansible_collections/arista/cvp/requirements-dev.txt + pip install -r ansible_collections/arista/cvp/requirements-dev-pytest.txt pip install -r ansible_collections/arista/cvp/requirements.txt - name: 'Execute pytest validation' run: | @@ -265,7 +266,7 @@ jobs: strategy: fail-fast: true matrix: - python_version: ['3.9'] + python_version: ['3.10'] steps: - name: 'set environment variables' run: | diff --git a/ansible_collections/arista/cvp/index.md b/ansible_collections/arista/cvp/index.md index b85b3eeb0..5ce8533f2 100644 --- a/ansible_collections/arista/cvp/index.md +++ b/ansible_collections/arista/cvp/index.md @@ -45,7 +45,7 @@ Please check the minimum version supported by your ansible installation on the [ **Ansible version:** -- ansible-core>=2.14.0,<2.17.0 +- ansible-core>=2.15.0,<2.18.0 **3rd party Python libraries:** diff --git a/ansible_collections/arista/cvp/meta/runtime.yml b/ansible_collections/arista/cvp/meta/runtime.yml index 12c32c099..9baec996c 100644 --- a/ansible_collections/arista/cvp/meta/runtime.yml +++ b/ansible_collections/arista/cvp/meta/runtime.yml @@ -1,5 +1,5 @@ --- -requires_ansible: '>=2.14.0,<2.17.0' +requires_ansible: '>=2.15.0,<2.18.0' plugin_routing: modules: cv_facts: diff --git a/ansible_collections/arista/cvp/requirements-dev-pytest.txt b/ansible_collections/arista/cvp/requirements-dev-pytest.txt new file mode 100644 index 000000000..9f7eda9df --- /dev/null +++ b/ansible_collections/arista/cvp/requirements-dev-pytest.txt @@ -0,0 +1,22 @@ +# Temp requirements for pytest testing. Required ansible-lint version as it's not compatible with Python 3.9, so it is removed. +ansible-core>=2.15.0,<2.18.0 +ansible-builder +galaxy-importer>=0.3.1 +pycodestyle +flake8 +pylint>=2.16.1 +twine +pre-commit>=2.9.2 +pre-commit-hooks>=3.3.0 +identify>=1.4.20 +docker +molecule>=3.2.0,<6.0 +molecule-docker>=0.2.4 +mitogen +pytest +pytest-cov>=2.11.1 +pytest-html>=3.1.1 +pytest-metadata>=1.11.0 +pytest-dependency +jmespath +pytest-mock diff --git a/ansible_collections/arista/cvp/requirements-dev.txt b/ansible_collections/arista/cvp/requirements-dev.txt index 39d0ec97a..b2cdfdb7e 100644 --- a/ansible_collections/arista/cvp/requirements-dev.txt +++ b/ansible_collections/arista/cvp/requirements-dev.txt @@ -1,6 +1,6 @@ -ansible-core>=2.15.0,<2.17.0 +ansible-core>=2.15.0,<2.18.0 ansible-builder -ansible-lint==6.22.2 +ansible-lint>=24.7.0 galaxy-importer>=0.3.1 pycodestyle flake8