From b719edf5dac9322e3b55e7ea106a259faba638f3 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Tue, 27 Feb 2024 16:56:07 +0100 Subject: [PATCH] .github: Update tested Ansible and Python versions Use Python 3.9 - 3.12 and Ansible 2.14 - 2.16, devel and milestone to run tests of the collection. Use the latest stable python version in test setups where sensible. Instead of using the integration.yml workflog from main use it from the same commit as the test runs instead. Signed-off-by: Felix Matouschek --- .github/workflows/ci.yml | 96 ++++++++++++------------ .github/workflows/docs.yml | 4 +- .github/workflows/extra-docs-linting.yml | 3 +- .github/workflows/integration.yml | 77 ++++--------------- .github/workflows/release.yml | 4 +- README.md | 4 +- 6 files changed, 69 insertions(+), 119 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15bdad3..9441c59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,8 +37,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' - cache: 'pip' + python-version: 3.x + cache: pip - name: Install yamllint, ansible run: | python -m pip install --upgrade pip @@ -55,61 +55,59 @@ jobs: with: matrix_include: "[]" matrix_exclude: >- - [ - { - "ansible-version": "stable-2.12" - }, - { - "ansible-version": "stable-2.13" - }, - { - "python-version": "3.7" - }, - { - "python-version": "3.8" - }, - { - "python-version": "3.9" - }, - { - "python-version": "3.10" - }, - { - "python-version": "3.12" - } - ] + [ + { + "ansible-version": "stable-2.14", + "python-version": "3.12" + }, + { + "ansible-version": "stable-2.15", + "python-version": "3.12" + }, + { + "ansible-version": "stable-2.16", + "python-version": "3.9" + }, + { + "ansible-version": "milestone", + "python-version": "3.9" + }, + { + "ansible-version": "devel", + "python-version": "3.9" + } + ] unit-source: uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main needs: - linter with: matrix_exclude: >- - [ - { - "ansible-version": "stable-2.12" - }, - { - "ansible-version": "stable-2.13" - }, - { - "python-version": "3.7" - }, - { - "python-version": "3.8" - }, - { - "python-version": "3.9" - }, - { - "python-version": "3.10" - }, - { - "python-version": "3.12" - } - ] + [ + { + "ansible-version": "stable-2.14", + "python-version": "3.12" + }, + { + "ansible-version": "stable-2.15", + "python-version": "3.12" + }, + { + "ansible-version": "stable-2.16", + "python-version": "3.9" + }, + { + "ansible-version": "milestone", + "python-version": "3.9" + }, + { + "ansible-version": "devel", + "python-version": "3.9" + } + ] collection_pre_install: '' integration: - uses: kubevirt/kubevirt.core/.github/workflows/integration.yml@main + uses: ./.github/workflows/integration.yml needs: - linter with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 611fe1c..4ebe1df 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,8 +34,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.11 - cache: 'pip' + python-version: 3.x + cache: pip - name: Install doc dependencies run: | diff --git a/.github/workflows/extra-docs-linting.yml b/.github/workflows/extra-docs-linting.yml index e659f86..f9ef99b 100644 --- a/.github/workflows/extra-docs-linting.yml +++ b/.github/workflows/extra-docs-linting.yml @@ -25,7 +25,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: 3.x + cache: pip - name: Install antsibull-docs run: pip install antsibull-docs --disable-pip-version-check diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e50c26b..aaef3e7 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -3,77 +3,24 @@ on: workflow_call: inputs: matrix_exclude: - # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix - # 2.9 supports Python 3.5-3.8 - # 2.13 supports Python 3.8-3.10 - # 2.14 supports Python 3.9-3.11 - # 2.15 supports Python 3.9-3.11 - # 2.16 supports Python 3.10-3.11 - # https://docs.ansible.com/ansible/devel/roadmap/ROADMAP_2_16.html - # milestone is 2.16 until after 2.16 branches from devel - # devel is 2.16 until 2023-09-18 default: >- [ { - "ansible-version": "stable-2.9", + "ansible-version": "stable-2.14", + "python-version": "3.12" + }, + { + "ansible-version": "stable-2.15", + "python-version": "3.12" + }, + { + "ansible-version": "stable-2.16", "python-version": "3.9" }, - { - "ansible-version": "stable-2.9", - "python-version": "3.10" - }, - { - "ansible-version": "stable-2.9", - "python-version": "3.11" - }, - { - "ansible-version": "stable-2.12", - "python-version": "3.11" - }, - { - "ansible-version": "stable-2.13", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.13", - "python-version": "3.11" - }, - { - "ansible-version": "stable-2.14", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.14", - "python-version": "3.8" - }, - { - "ansible-version": "stable-2.15", - "python-version": "3.7" - }, - { - "ansible-version": "stable-2.15", - "python-version": "3.8" - }, - { - "ansible-version": "milestone", - "python-version": "3.7" - }, - { - "ansible-version": "milestone", - "python-version": "3.8" - }, { "ansible-version": "milestone", "python-version": "3.9" }, - { - "ansible-version": "devel", - "python-version": "3.7" - }, - { - "ansible-version": "devel", - "python-version": "3.8" - }, { "ansible-version": "devel", "python-version": "3.9" @@ -82,8 +29,6 @@ on: required: false type: string matrix_include: - # python 3.6 is not available after ubuntu-20.04 - # python 3.6 is not supported on ansible 2.12+ default: >- [] required: false @@ -113,10 +58,14 @@ jobs: ansible-version: - stable-2.14 - stable-2.15 + - stable-2.16 - milestone - devel python-version: + - "3.9" + - "3.10" - "3.11" + - "3.12" exclude: ${{ fromJSON(inputs.matrix_exclude) }} include: ${{ fromJSON(inputs.matrix_include) }} runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 345ef9a..92a979b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,8 +25,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.x" - cache: 'pip' + python-version: 3.x + cache: pip - name: Get current version id: get_version diff --git a/README.md b/README.md index 68295ee..a5630dd 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ This repository hosts the `kubevirt.core` Ansible Collection, which provides vir ## Ansible and Python version compatibility -This collection has been tested against following Ansible versions **>=2.14.0** and the following Python versions **>=3.11.0,<3.12.0**. +This collection has been tested against Ansible versions **>=2.14,<=2.16** and Python versions **>=3.9,<=3.12**. + +See the [Ansible core support matrix](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix) for supported combinations. ## Included content