mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
CI - increase the number of integration workflow (#620)
enable profile_tasks callback plugin for integration tests targets
This commit is contained in:
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
@@ -40,25 +40,27 @@ jobs:
|
||||
uses: ansible-network/github_actions/.github/actions/ansible_test_splitter@main
|
||||
with:
|
||||
collections_to_test: ${{ env.source_dir }}
|
||||
total_jobs: 8
|
||||
|
||||
- name: display targets
|
||||
id: display
|
||||
run: echo "test_targets=${{ steps.splitter.outputs.test_targets }}" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
integration:
|
||||
needs:
|
||||
- splitter
|
||||
env:
|
||||
source: "./source"
|
||||
cloud_common: "./cloudcommon"
|
||||
ansible_posix: "./ansible_posix"
|
||||
test_targets: ${{ needs.splitter.outputs.test_targets }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- stable-2.9
|
||||
- stable-2.10
|
||||
- stable-2.12
|
||||
- milestone
|
||||
- devel
|
||||
@@ -87,13 +89,9 @@ jobs:
|
||||
enable-turbo-mode:
|
||||
- true
|
||||
- false
|
||||
job-index:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
name: "kubernetes.core-py${{ matrix.python-version }}-${{ matrix.ansible-version }}-turbo-mode=${{ matrix.enable-turbo-mode }}-${{ matrix.job-index }}"
|
||||
job-index: [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
name: "integration-py${{ matrix.python-version }}-${{ matrix.ansible-version }}-turbo-mode=${{ matrix.enable-turbo-mode }}-${{ matrix.job-index }}"
|
||||
steps:
|
||||
# could read collection name using $(yq -r '.namespace' galaxy.yml).$(yq -r '.name' galaxy.yml)
|
||||
- name: Read ansible-test targets
|
||||
id: read-targets
|
||||
run: >-
|
||||
@@ -101,6 +99,13 @@ jobs:
|
||||
grep "kubernetes.core-${{ matrix.job-index }}" | cut -d ':' -f2 | sed s/','/' '/g)" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Display targets
|
||||
run: >-
|
||||
echo "targets to test: $ANSIBLE_TARGETS"
|
||||
shell: bash
|
||||
env:
|
||||
ANSIBLE_TARGETS: ${{ steps.read-targets.outputs.ansible_test_targets }}
|
||||
|
||||
- name: Checkout kubernetes.core repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -116,6 +121,14 @@ jobs:
|
||||
ref: main
|
||||
if: steps.read-targets.outputs.ansible_test_targets != ''
|
||||
|
||||
- name: checkout ansible-collections/ansible.posix
|
||||
uses: ansible-network/github_actions/.github/actions/checkout_dependency@main
|
||||
with:
|
||||
repository: ansible-collections/ansible.posix
|
||||
path: ${{ env.ansible_posix }}
|
||||
ref: main
|
||||
if: steps.read-targets.outputs.ansible_test_targets != ''
|
||||
|
||||
- name: install kubernetes.core collection
|
||||
id: install-collection
|
||||
uses: abikouo/github_actions/.github/actions/build_install_collection@build_install_collection
|
||||
@@ -131,6 +144,13 @@ jobs:
|
||||
source_path: ${{ env.cloud_common }}
|
||||
if: steps.read-targets.outputs.ansible_test_targets != ''
|
||||
|
||||
- name: install ansible.posix collection
|
||||
uses: abikouo/github_actions/.github/actions/build_install_collection@build_install_collection
|
||||
with:
|
||||
install_python_dependencies: true
|
||||
source_path: ${{ env.ansible_posix }}
|
||||
if: steps.read-targets.outputs.ansible_test_targets != ''
|
||||
|
||||
- name: create kubernetes cluster
|
||||
uses: helm/kind-action@v1.4.0
|
||||
if: steps.read-targets.outputs.ansible_test_targets != ''
|
||||
|
||||
Reference in New Issue
Block a user