CI #532
This file contains 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
# README FIRST | |
# 1. If you don't have unit tests, remove that section. | |
# 2. If your collection depends on other collections ensure they are installed, | |
# add them to the "test-deps" input. | |
# 3. For the comprehensive list of the inputs supported by the | |
# ansible-community/ansible-test-gh-action GitHub Action, see | |
# https://github.com/marketplace/actions/ansible-test. | |
# 4. If you need help please ask in #ansible-community on the Libera.chat IRC | |
# network. | |
name: CI | |
on: | |
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests | |
push: | |
branches: | |
- main | |
- stable-* | |
pull_request: | |
# Run CI once every Sunday (at 06:00 UTC) | |
# This ensures that even if there haven't been commits that we are still | |
# testing against latest version of ansible-test for each ansible-core | |
# version | |
schedule: | |
- cron: '0 6 * * 0' | |
# manual | |
workflow_dispatch: | |
jobs: | |
### | |
# Sanity tests (REQUIRED) | |
# | |
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html | |
sanity: | |
name: Sanity tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Ansible Support Matrix | |
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix | |
ansible: | |
- stable-2.14 | |
- stable-2.15 | |
- stable-2.16 | |
- devel | |
python: | |
- 3.11 | |
os: | |
- ubuntu-22.04 | |
steps: | |
- name: Sanity testing | |
uses: ansible-community/ansible-test-gh-action@release/v1 | |
with: | |
ansible-core-version: ${{ matrix.ansible }} | |
target-python-version: ${{ matrix.python }} | |
testing-type: sanity | |
test-deps: >- | |
ansible.netcommon | |
### | |
# Unit tests (OPTIONAL) | |
# | |
# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html | |
units: | |
name: Unit tests (${{ matrix.ansible }}+py${{ matrix.python }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Ansible Support matrix | |
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix | |
ansible: | |
- stable-2.14 | |
- stable-2.15 | |
- stable-2.16 | |
- devel | |
python: | |
# - "2.7" no support for old Python | |
- "3.5" | |
- "3.6" | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
os: | |
- ubuntu-22.04 | |
exclude: | |
# no support | |
- ansible: stable-2.14 | |
python: "3.12" | |
- ansible: stable-2.15 | |
python: "3.12" | |
- ansible: stable-2.16 | |
python: "3.5" | |
- ansible: devel | |
python: "3.5" | |
- ansible: devel | |
python: "3.6" | |
- ansible: devel | |
python: "3.7" | |
steps: | |
- name: Unit testing | |
uses: ansible-community/ansible-test-gh-action@release/v1 | |
with: | |
ansible-core-version: ${{ matrix.ansible }} | |
target-python-version: ${{ matrix.python }} | |
testing-type: units | |
test-deps: >- | |
ansible.netcommon | |
ansible.utils |