mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
Add unit and sanity tests to GHA (#614)
* Add unit and sanity tests to GHA Signed-off-by: GomathiselviS <gomathiselvi@gmail.com> * Fix sanity issues * Add sanity non voting * Add changelog * Fix typo * Fix typo * Use pytest-ansible * Add support for pytest-ansible --------- Signed-off-by: GomathiselviS <gomathiselvi@gmail.com>
This commit is contained in:
144
.github/workflows/ci.yml
vendored
144
.github/workflows/ci.yml
vendored
@@ -22,6 +22,130 @@ jobs:
|
||||
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
|
||||
linters:
|
||||
uses: abikouo/github_actions/.github/workflows/tox-linters.yml@tox_linters
|
||||
sanity:
|
||||
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main
|
||||
with:
|
||||
matrix_include: "[]"
|
||||
matrix_exclude: >-
|
||||
[
|
||||
{
|
||||
"ansible-version": "stable-2.9"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.12",
|
||||
"python-version": "3.7"
|
||||
},
|
||||
{
|
||||
"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.14",
|
||||
"python-version": "3.11"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.15",
|
||||
"python-version": "3.7"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.15",
|
||||
"python-version": "3.8"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.15",
|
||||
"python-version": "3.11"
|
||||
},
|
||||
{
|
||||
"ansible-version": "milestone",
|
||||
"python-version": "3.7"
|
||||
},
|
||||
{
|
||||
"ansible-version": "milestone",
|
||||
"python-version": "3.8"
|
||||
},
|
||||
{
|
||||
"ansible-version": "devel",
|
||||
"python-version": "3.7"
|
||||
},
|
||||
{
|
||||
"ansible-version": "devel",
|
||||
"python-version": "3.8"
|
||||
}
|
||||
]
|
||||
unit-source:
|
||||
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
|
||||
with:
|
||||
matrix_exclude: >-
|
||||
[
|
||||
{
|
||||
"python-version": "3.11"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.12",
|
||||
"python-version": "3.7"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.13",
|
||||
"python-version": "3.7"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.12",
|
||||
"python-version": "3.8"
|
||||
},
|
||||
{
|
||||
"ansible-version": "stable-2.13",
|
||||
"python-version": "3.8"
|
||||
},
|
||||
{
|
||||
"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": "devel",
|
||||
"python-version": "3.7"
|
||||
},
|
||||
{
|
||||
"ansible-version": "devel",
|
||||
"python-version": "3.8"
|
||||
}
|
||||
]
|
||||
collection_pre_install: ''
|
||||
splitter:
|
||||
env:
|
||||
source_dir: "./source"
|
||||
@@ -165,3 +289,23 @@ jobs:
|
||||
ansible_test_environment: |
|
||||
ENABLE_TURBO_MODE=${{ matrix.enable-turbo-mode }}
|
||||
if: steps.read-targets.outputs.ansible_test_targets != ''
|
||||
all_green:
|
||||
if: ${{ always() }}
|
||||
needs:
|
||||
- changelog
|
||||
- linters
|
||||
- sanity
|
||||
- unit-source
|
||||
- integration
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: >-
|
||||
python -c "assert set([
|
||||
'${{ needs.changelog.result }}',
|
||||
'${{ needs.linters.result }}',
|
||||
'${{ needs.unit-source.result }}',
|
||||
'${{ needs.integration.result }}'
|
||||
]) == {'success'}"
|
||||
- run: >-
|
||||
python -c "assert '${{ needs.sanity.result }}'
|
||||
in ['success', 'failure']"
|
||||
|
||||
Reference in New Issue
Block a user