.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 <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2024-02-27 16:56:07 +01:00
parent 9ad43a9677
commit b719edf5da
6 changed files with 69 additions and 119 deletions

View File

@@ -37,8 +37,8 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: 3.x
cache: 'pip' cache: pip
- name: Install yamllint, ansible - name: Install yamllint, ansible
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
@@ -55,61 +55,59 @@ jobs:
with: with:
matrix_include: "[]" matrix_include: "[]"
matrix_exclude: >- matrix_exclude: >-
[ [
{ {
"ansible-version": "stable-2.12" "ansible-version": "stable-2.14",
}, "python-version": "3.12"
{ },
"ansible-version": "stable-2.13" {
}, "ansible-version": "stable-2.15",
{ "python-version": "3.12"
"python-version": "3.7" },
}, {
{ "ansible-version": "stable-2.16",
"python-version": "3.8" "python-version": "3.9"
}, },
{ {
"python-version": "3.9" "ansible-version": "milestone",
}, "python-version": "3.9"
{ },
"python-version": "3.10" {
}, "ansible-version": "devel",
{ "python-version": "3.9"
"python-version": "3.12" }
} ]
]
unit-source: unit-source:
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
needs: needs:
- linter - linter
with: with:
matrix_exclude: >- matrix_exclude: >-
[ [
{ {
"ansible-version": "stable-2.12" "ansible-version": "stable-2.14",
}, "python-version": "3.12"
{ },
"ansible-version": "stable-2.13" {
}, "ansible-version": "stable-2.15",
{ "python-version": "3.12"
"python-version": "3.7" },
}, {
{ "ansible-version": "stable-2.16",
"python-version": "3.8" "python-version": "3.9"
}, },
{ {
"python-version": "3.9" "ansible-version": "milestone",
}, "python-version": "3.9"
{ },
"python-version": "3.10" {
}, "ansible-version": "devel",
{ "python-version": "3.9"
"python-version": "3.12" }
} ]
]
collection_pre_install: '' collection_pre_install: ''
integration: integration:
uses: kubevirt/kubevirt.core/.github/workflows/integration.yml@main uses: ./.github/workflows/integration.yml
needs: needs:
- linter - linter
with: with:

View File

@@ -34,8 +34,8 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: 3.11 python-version: 3.x
cache: 'pip' cache: pip
- name: Install doc dependencies - name: Install doc dependencies
run: | run: |

View File

@@ -25,7 +25,8 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: 3.x
cache: pip
- name: Install antsibull-docs - name: Install antsibull-docs
run: pip install antsibull-docs --disable-pip-version-check run: pip install antsibull-docs --disable-pip-version-check

View File

@@ -3,77 +3,24 @@ on:
workflow_call: workflow_call:
inputs: inputs:
matrix_exclude: 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: >- 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" "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", "ansible-version": "milestone",
"python-version": "3.9" "python-version": "3.9"
}, },
{
"ansible-version": "devel",
"python-version": "3.7"
},
{
"ansible-version": "devel",
"python-version": "3.8"
},
{ {
"ansible-version": "devel", "ansible-version": "devel",
"python-version": "3.9" "python-version": "3.9"
@@ -82,8 +29,6 @@ on:
required: false required: false
type: string type: string
matrix_include: matrix_include:
# python 3.6 is not available after ubuntu-20.04
# python 3.6 is not supported on ansible 2.12+
default: >- default: >-
[] []
required: false required: false
@@ -113,10 +58,14 @@ jobs:
ansible-version: ansible-version:
- stable-2.14 - stable-2.14
- stable-2.15 - stable-2.15
- stable-2.16
- milestone - milestone
- devel - devel
python-version: python-version:
- "3.9"
- "3.10"
- "3.11" - "3.11"
- "3.12"
exclude: ${{ fromJSON(inputs.matrix_exclude) }} exclude: ${{ fromJSON(inputs.matrix_exclude) }}
include: ${{ fromJSON(inputs.matrix_include) }} include: ${{ fromJSON(inputs.matrix_include) }}
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -25,8 +25,8 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.x" python-version: 3.x
cache: 'pip' cache: pip
- name: Get current version - name: Get current version
id: get_version id: get_version

View File

@@ -8,7 +8,9 @@ This repository hosts the `kubevirt.core` Ansible Collection, which provides vir
<!--start requires_ansible--> <!--start requires_ansible-->
## Ansible and Python version compatibility ## 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.
<!--end requires_ansible--> <!--end requires_ansible-->
## Included content ## Included content