collection: Add ansible-test sanity workflow and fix sanity errors #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # Always check ansible-core support matrix before configuring units matrix. | |
| # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix | |
| name: Ansible Test - Sanity | |
| on: | |
| schedule: | |
| # This is 01:05 UTC, which is 3:05 AM in Prague/CEST | |
| - cron: '5 3 * * 1' | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| workflow_dispatch: | |
| jobs: | |
| sanity-supported: | |
| runs-on: ubuntu-latest | |
| name: Sanity (Supported Ⓐ${{ matrix.ansible }}) | |
| strategy: | |
| fail-fast: false # Disabled so we can see all failed combinations. | |
| # Define a build matrix to test compatibility across multiple Ansible versions. | |
| # Each version listed below will spawn a separate job that runs in parallel. | |
| matrix: | |
| ansible: | |
| - 'stable-2.18' # Python 3.11 - 3.13 | |
| - 'stable-2.19' # Python 3.11 - 3.13 | |
| - 'devel' # Test against the upcoming development version. | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: ansible-test - sanity | |
| uses: ansible-community/ansible-test-gh-action@release/v1 | |
| with: | |
| ansible-core-version: ${{ matrix.ansible }} | |
| testing-type: sanity | |
| sanity-eol: | |
| runs-on: ubuntu-latest | |
| # This job only runs if the supported tests pass | |
| needs: sanity-supported | |
| name: Sanity (EOL Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}) | |
| continue-on-error: true # This entire job is allowed to fail | |
| strategy: | |
| fail-fast: false # Disabled so we can see all failed combinations. | |
| # Define a build matrix to test compatibility across multiple Ansible versions. | |
| # Each version listed below will spawn a separate job that runs in parallel. | |
| matrix: | |
| ansible: | |
| - 'stable-2.14' # Python 3.9 - 3.11 | |
| - 'stable-2.15' # Python 3.9 - 3.11 | |
| - 'stable-2.16' # Python 3.10 - 3.12 | |
| - 'stable-2.17' # Python 3.10 - 3.12 | |
| python: | |
| - '3.9' | |
| - '3.10' | |
| - '3.11' | |
| - '3.12' | |
| exclude: | |
| # Exclusions for incompatible Python versions. | |
| - ansible: 'stable-2.14' | |
| python: '3.12' | |
| - ansible: 'stable-2.15' | |
| python: '3.12' | |
| - ansible: 'stable-2.16' | |
| python: '3.9' | |
| - ansible: 'stable-2.17' | |
| python: '3.9' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: ansible-test - sanity | |
| uses: ansible-community/ansible-test-gh-action@release/v1 | |
| with: | |
| ansible-core-version: ${{ matrix.ansible }} | |
| target-python-version: ${{ matrix.python }} | |
| testing-type: sanity |