mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-03-26 19:03:16 +00:00
Update the test matrices to include the latest ansible-core and python versions. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
175 lines
5.0 KiB
YAML
175 lines
5.0 KiB
YAML
---
|
|
name: Integration tests
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
matrix_exclude:
|
|
default: >-
|
|
[
|
|
{
|
|
"ansible-version": "stable-2.16",
|
|
"python-version": "3.13"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.16",
|
|
"python-version": "3.14"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.17",
|
|
"python-version": "3.13"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.17",
|
|
"python-version": "3.14"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.18",
|
|
"python-version": "3.10"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.18",
|
|
"python-version": "3.14"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.19",
|
|
"python-version": "3.10"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.19",
|
|
"python-version": "3.14"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.20",
|
|
"python-version": "3.10"
|
|
},
|
|
{
|
|
"ansible-version": "stable-2.20",
|
|
"python-version": "3.11"
|
|
},
|
|
{
|
|
"ansible-version": "milestone",
|
|
"python-version": "3.10"
|
|
},
|
|
{
|
|
"ansible-version": "milestone",
|
|
"python-version": "3.11"
|
|
},
|
|
{
|
|
"ansible-version": "devel",
|
|
"python-version": "3.10"
|
|
},
|
|
{
|
|
"ansible-version": "devel",
|
|
"python-version": "3.11"
|
|
}
|
|
]
|
|
required: false
|
|
type: string
|
|
matrix_include:
|
|
default: >-
|
|
[]
|
|
required: false
|
|
type: string
|
|
unstable:
|
|
default: >-
|
|
[
|
|
"devel",
|
|
]
|
|
required: false
|
|
type: string
|
|
ansible_test_targets:
|
|
required: true
|
|
type: string
|
|
jobs:
|
|
integration:
|
|
name: >-
|
|
${{ matrix.test-target }} /
|
|
py${{ matrix.python-version }} /
|
|
${{ matrix.ansible-version }}
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: >-
|
|
${{ contains(fromJSON(inputs.unstable), matrix.ansible-version) }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
test-target: ${{ fromJSON(inputs.ansible_test_targets) }}
|
|
ansible-version:
|
|
- stable-2.16
|
|
- stable-2.17
|
|
- stable-2.18
|
|
- stable-2.19
|
|
- stable-2.20
|
|
- milestone
|
|
- devel
|
|
python-version:
|
|
- "3.10"
|
|
- "3.11"
|
|
- "3.12"
|
|
- "3.13"
|
|
- "3.14"
|
|
exclude: ${{ fromJSON(inputs.matrix_exclude) }}
|
|
include: ${{ fromJSON(inputs.matrix_include) }}
|
|
env:
|
|
source_directory: ./source
|
|
steps:
|
|
|
|
- name: Checkout kubevirt.core repository
|
|
if: inputs.ansible_test_targets != ''
|
|
uses: actions/checkout@v5
|
|
with:
|
|
path: ${{ env.source_directory }}
|
|
fetch-depth: 0
|
|
|
|
- name: Install collection dependencies
|
|
if: inputs.ansible_test_targets != ''
|
|
run: |
|
|
ansible-galaxy collection install \
|
|
-r ${{ env.source_directory }}/requirements.yml \
|
|
-p /home/runner/collections --force-with-deps
|
|
# Install ansible.posix to have the ansible.posix.profile_task callback available
|
|
ansible-galaxy collection install ansible.posix \
|
|
-p /home/runner/collections --force-with-deps
|
|
|
|
- name: Install kubevirt.core collection
|
|
id: install
|
|
if: inputs.ansible_test_targets != ''
|
|
uses: ansible-network/github_actions/.github/actions/build_install_collection@main
|
|
with:
|
|
install_python_dependencies: true
|
|
source_path: ${{ env.source_directory }}
|
|
|
|
- name: Install kind / kubectl
|
|
if: inputs.ansible_test_targets != ''
|
|
uses: helm/kind-action@v1.13.0
|
|
with:
|
|
version: v0.30.0
|
|
install_only: true
|
|
|
|
- name: Deploy kubevirt
|
|
if: inputs.ansible_test_targets != ''
|
|
run: >-
|
|
${{ env.source_directory }}/hack/e2e-setup.sh \
|
|
-v \
|
|
--configure-inotify-limits \
|
|
--configure-secondary-network \
|
|
--deploy-kubevirt \
|
|
--deploy-kubevirt-cdi \
|
|
--deploy-cnao \
|
|
--create-cluster \
|
|
--create-nad
|
|
env:
|
|
KIND: kind
|
|
KUBECTL: kubectl
|
|
|
|
- name: Run integration tests
|
|
if: inputs.ansible_test_targets != ''
|
|
uses: ansible-network/github_actions/.github/actions/ansible_test_integration@main
|
|
with:
|
|
collection_path: ${{ steps.install.outputs.collection_path }}
|
|
python_version: ${{ matrix.python-version }}
|
|
ansible_version: ${{ matrix.ansible-version }}
|
|
ansible_test_targets: ${{ matrix.test-target }}
|
|
env:
|
|
ANSIBLE_COLLECTIONS_PATHS: /home/runner/collections
|