Files
kubevirt.core/.github/workflows/integration.yml
Felix Matouschek fa9183c21a hack: Bump e2e-setup.sh version
Bump the software versions defined in hack/e2e-setup.sh to the latest
ones and sync version installed of kind in github integration tests
with e2e-setup.sh. Update the CentOS 9 Stream preference name used in
the tests to the new name in common-instancetypes v0.4.0.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-29 09:47:50 +01:00

134 lines
4.0 KiB
YAML

name: Integration tests
on:
workflow_call:
inputs:
matrix_exclude:
default: >-
[
{
"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"
}
]
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:
env:
PY_COLORS: "1"
source: "./source"
core: "./core"
cloud_common: "./cloudcommon"
ansible_posix: "./ansible_posix"
strategy:
fail-fast: false
matrix:
test-target: ${{ fromJSON(inputs.ansible_test_targets) }}
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
continue-on-error: ${{ contains(fromJSON(inputs.unstable), matrix.ansible-version) }}
name: "${{ matrix.test-target }} / py${{ matrix.python-version }} / ${{ matrix.ansible-version }}"
steps:
- name: Checkout kubevirt.core repository
uses: actions/checkout@v4
with:
path: ${{ env.source }}
fetch-depth: 0
if: inputs.ansible_test_targets != ''
- name: install dependencies collection
run: |
ansible-galaxy collection install ansible.posix --force --pre -p /home/runner/collections
ansible-galaxy collection install cloud.common --force --pre -p /home/runner/collections
ansible-galaxy collection install kubernetes.core --force --pre -p /home/runner/collections
if: inputs.ansible_test_targets != ''
- name: install kubevirt.core collection
id: install-collection
uses: ansible-network/github_actions/.github/actions/build_install_collection@main
with:
install_python_dependencies: true
source_path: ${{ env.source }}
if: inputs.ansible_test_targets != ''
- name: install kind / kubectl
uses: helm/kind-action@v1.9.0
with:
version: v0.22.0
install_only: true
if: inputs.ansible_test_targets != ''
- name: deploy kubevirt
if: inputs.ansible_test_targets != ''
run: >-
${{ env.source }}/hack/e2e-setup.sh \
-v \
--configure-inotify-limits \
--configure-secondary-network \
--deploy-kubevirt \
--deploy-kubevirt-cdi \
--deploy-kubevirt-common-instancetypes \
--deploy-cnao \
--create-cluster \
--create-nad
shell: bash
env:
CLUSTER_NAME: kv-testing
KIND: kind
KUBECTL: kubectl
- name: Run integration tests
uses: ansible-network/github_actions/.github/actions/ansible_test_integration@main
with:
collection_path: ${{ steps.install-collection.outputs.collection_path }}
python_version: ${{ matrix.python-version }}
ansible_version: ${{ matrix.ansible-version }}
ansible_test_targets: ${{ matrix.test-target }}
if: inputs.ansible_test_targets != ''
env:
ANSIBLE_COLLECTIONS_PATHS: /home/runner/collections