2023-01-11 19:55:24 +00:00
|
|
|
---
|
|
|
|
name: Ansible Integration Test
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
targets:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
ansible-core-versions:
|
|
|
|
required: false
|
|
|
|
default: '["stable-2.14"]'
|
|
|
|
type: string
|
|
|
|
target-python-versions:
|
|
|
|
required: false
|
|
|
|
default: '["default"]'
|
|
|
|
type: string
|
2023-08-16 17:06:43 +00:00
|
|
|
coverage:
|
|
|
|
required: false
|
|
|
|
default: auto
|
|
|
|
type: string
|
2023-01-11 19:55:24 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
ansible-test-integration:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2024-10-15 17:53:17 +00:00
|
|
|
max-parallel: 10
|
2023-01-11 19:55:24 +00:00
|
|
|
matrix:
|
|
|
|
targets: ${{ fromJson(inputs.targets) }}
|
|
|
|
ansible-core-versions: ${{ fromJson(inputs.ansible-core-versions) }}
|
|
|
|
target-python-versions: ${{ fromJson(inputs.target-python-versions) }}
|
|
|
|
|
|
|
|
name: "${{ matrix.targets.name }}-${{ matrix.ansible-core-versions }}"
|
|
|
|
steps:
|
|
|
|
- name: "Perform ${{ matrix.targets.test }} integration test with ansible-test"
|
|
|
|
uses: ansible-community/ansible-test-gh-action@release/v1
|
|
|
|
with:
|
|
|
|
ansible-core-version: ${{ matrix.ansible-core-versions }}
|
|
|
|
target-python-version: ${{ matrix.target-python-versions }}
|
|
|
|
controller-python-version: auto
|
|
|
|
docker-image: "--docker-privileged" # Workaround because ansible-test action doesn't support setting privileged flag
|
|
|
|
testing-type: integration
|
|
|
|
target: ${{ matrix.targets.test }}
|
2023-08-16 18:04:51 +00:00
|
|
|
coverage: ${{ inputs.coverage }}
|
2024-09-13 10:59:14 +00:00
|
|
|
ansible-core-github-repository-slug: ${{ contains(fromJson('["stable-2.9", "stable-2.10", "stable-2.11"]'), matrix.ansible-core-versions) &&
|
|
|
|
'ansible-community/eol-ansible' || 'ansible/ansible' }}
|
2023-04-26 16:01:21 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|