1+ ---
2+ # Always check ansible-core support matrix before configuring units matrix.
3+ # https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
4+
15name : CI
26on :
3- # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
47 push :
8+ branches :
9+ - main
10+ - dev
11+
512 pull_request :
13+
614 # Run CI once per day (at 06:00 UTC)
715 # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version
816 schedule :
917 - cron : ' 0 6 * * *'
10- env :
11- NAMESPACE : community
12- COLLECTION_NAME : sap_libs
18+
19+ workflow_dispatch :
1320
1421jobs :
15- sanity :
16- name : Sanity (Ⓐ${{ matrix.ansible }})
22+ sanity-supported :
23+ runs-on : ubuntu-latest
24+ name : Sanity (Supported Ⓐ${{ matrix.ansible }})
1725 strategy :
26+ fail-fast : false # Disabled so we can see all failed combinations.
27+ # Define a build matrix to test compatibility across multiple Ansible versions.
28+ # Each version listed below will spawn a separate job that runs in parallel.
1829 matrix :
1930 ansible :
20- - stable-2.13
21- - stable-2.14
22- - stable-2.15
23- - stable-2.16
24- - stable-2.17
25- - stable-2.18
26- - stable-2.19
27- - devel
28-
29- runs-on : >-
30- ${{ contains(fromJson(
31- '["stable-2.13", "stable-2.14"]'
32- ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
31+ # Supported versions (must pass)
32+ - ' stable-2.18' # Python 3.11 - 3.13
33+ - ' stable-2.19' # Python 3.11 - 3.13
34+ - ' devel' # Test against the upcoming development version.
3335 steps :
36+ - uses : actions/checkout@v5
3437
35- - name : Check out code
36- uses : actions/checkout@v4
38+ - name : ansible-test - sanity
39+ uses : ansible-community/ansible-test-gh-action@release/v1
40+ with :
41+ ansible-core-version : ${{ matrix.ansible }}
42+ testing-type : sanity
3743
38- - name : Perform sanity testing with ansible-test
44+
45+ sanity-eol :
46+ runs-on : ubuntu-latest
47+ # This job only runs if the supported tests pass
48+ needs : sanity-supported
49+ name : Sanity (EOL Ⓐ${{ matrix.ansible }})
50+ continue-on-error : true # This entire job is allowed to fail
51+ strategy :
52+ fail-fast : false # Disabled so we can see all failed combinations.
53+ # Define a build matrix to test compatibility across multiple Ansible versions.
54+ # Each version listed below will spawn a separate job that runs in parallel.
55+ matrix :
56+ ansible :
57+ # EOL versions (allowed to fail)
58+ # NOTE: Ensure that meta/runtime.yml `requires_ansible` version is aligned with tested versions.
59+ - ' stable-2.14' # Python 3.9 - 3.11
60+ - ' stable-2.15' # Python 3.9 - 3.11
61+ - ' stable-2.16' # Python 3.10 - 3.12
62+ - ' stable-2.17' # Python 3.10 - 3.12
63+ steps :
64+ - uses : actions/checkout@v5
65+
66+ - name : ansible-test - sanity
3967 uses : ansible-community/ansible-test-gh-action@release/v1
4068 with :
4169 ansible-core-version : ${{ matrix.ansible }}
4270 testing-type : sanity
43-
44-
45- units :
46- runs-on : >-
47- ${{ contains(fromJson(
48- '["stable-2.13", "stable-2.14"]'
49- ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
50- name : Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
71+
72+ units-supported :
73+ runs-on : ubuntu-latest
74+ name : Units (Supported Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
5175 strategy :
52- # As soon as the first unit test fails, cancel the others to free up the CI queue
53- fail-fast : true
76+ fail-fast : false # Disabled so we can see all failed combinations.
77+ # Define a build matrix to test compatibility across multiple Ansible versions.
78+ # Each version listed below will spawn a separate job that runs in parallel.
5479 matrix :
5580 ansible :
56- - stable-2.13
57- - stable-2.14
58- - stable-2.15
59- - stable-2.16
60- - stable-2.17
61- - stable-2.18
62- - stable-2.19
63- - devel
81+ - ' stable-2.18' # Python 3.11 - 3.13
82+ - ' stable-2.19' # Python 3.11 - 3.13
83+ - ' devel' # Test against the upcoming development version.
84+ python :
85+ - ' 3.11'
86+ - ' 3.12'
87+ - ' 3.13'
6488
6589 steps :
66- - name : Check out code
67- uses : actions/checkout@v4
90+ - uses : actions/checkout@v5
6891
69- - name : Perform unit testing with ansible-test
92+ - name : ansible-test - units
7093 uses : ansible-community/ansible-test-gh-action@release/v1
7194 with :
7295 ansible-core-version : ${{ matrix.ansible }}
96+ target-python-version : ${{ matrix.python }}
7397 testing-type : units
74- # test-deps: >-
75- # ansible.netcommon
76- # ansible.utils
77-
78- # Please consult the Readme for information on why we disabled integration tests temporarily.
79-
80- # integration:
81- # runs-on: ubuntu-latest
82- # name: I (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
83- # strategy:
84- # fail-fast: false
85- # matrix:
86- # ansible:
87- # - stable-2.9 # Only if your collection supports Ansible 2.9
88- # - stable-2.10
89- # - stable-2.11
90- # - stable-2.12
91- # - stable-2.13
92- # - devel
93- # python:
94- # - 2.6
95- # - 2.7
96- # - 3.5
97- # - 3.6
98- # - 3.7
99- # - 3.8
100- # - 3.9
101- # exclude:
102- # # Because ansible-test doesn't support python3.9 for Ansible 2.9
103- # - ansible: stable-2.9
104- # python: 3.9
105- # - ansible: devel
106- # python: 2.6
107-
108- # steps:
109- # - name: Check out code
110- # uses: actions/checkout@v3
111-
112- # - name: Perform integration testing with ansible-test
113- # uses: ansible-community/ansible-test-gh-action@release/v1
114- # with:
115- # ansible-core-version: ${{ matrix.ansible }}
116- # python-version: 3.8
117- # pre-test-cmd: >-
118- # mkdir -p tests/output/
119- # touch tests/output/coverage
120- # target-python-version: ${{ matrix.python }}
121- # testing-type: integration
122- # test-deps: >-
123- # ansible.netcommon
124- # ansible.utils
98+
99+ units-eol :
100+ runs-on : ubuntu-latest
101+ # This job only runs if the supported tests pass
102+ needs : units-supported
103+ name : Units (EOL Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
104+ continue-on-error : true # This entire job is allowed to fail
105+ strategy :
106+ fail-fast : false # Disabled so we can see all failed combinations.
107+ # Define a build matrix to test compatibility across multiple Ansible versions.
108+ # Each version listed below will spawn a separate job that runs in parallel.
109+ matrix :
110+ ansible :
111+ - ' stable-2.14' # Python 3.9 - 3.11
112+ - ' stable-2.15' # Python 3.9 - 3.11
113+ - ' stable-2.16' # Python 3.10 - 3.12
114+ - ' stable-2.17' # Python 3.10 - 3.12
115+ python :
116+ - ' 3.9'
117+ - ' 3.10'
118+ - ' 3.11'
119+ - ' 3.12'
120+ exclude :
121+ # Exclusions for incompatible Python versions.
122+ - ansible : ' stable-2.14'
123+ python : ' 3.12'
124+
125+ - ansible : ' stable-2.15'
126+ python : ' 3.12'
127+
128+ - ansible : ' stable-2.16'
129+ python : ' 3.9'
130+
131+ - ansible : ' stable-2.17'
132+ python : ' 3.9'
133+
134+ steps :
135+ - uses : actions/checkout@v5
136+
137+ - name : ansible-test - units
138+ uses : ansible-community/ansible-test-gh-action@release/v1
139+ with :
140+ ansible-core-version : ${{ matrix.ansible }}
141+ target-python-version : ${{ matrix.python }}
142+ testing-type : units
143+
144+ # Please consult the Readme for information on why we disabled integration tests temporarily.
0 commit comments