Debian Codegraph @

ansible_collections/community/general/.github/workflows/ansible-test.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 # For the comprehensive list of the inputs supported by the ansible-community/ansible-test-gh-action GitHub Action, see
7 # https://github.com/marketplace/actions/ansible-test
8
9 name: EOL CI
10 "on":
11 # Run EOL CI against all pushes (direct commits, also merged PRs), Pull Requests
12 push:
13 branches:
14 - main
15 - stable-*
16 pull_request:
17 # Run EOL CI once per day (at 08:00 UTC)
18 schedule:
19 - cron: '0 8 * * *'
20
21 concurrency:
22 # Make sure there is at most one active run per PR, but do not cancel any non-PR runs
23 group: ${{ github.workflow }}-${{ (github.head_ref && github.event.number) || github.run_id }}
24 cancel-in-progress: true
25
26 jobs:
27 sanity:
28 name: EOL Sanity (Ⓐ${{ matrix.ansible }})
29 strategy:
30 matrix:
31 ansible:
32 - '2.18'
33 runs-on: ubuntu-latest
34 steps:
35 - name: Perform sanity testing
36 uses: felixfontein/ansible-test-gh-action@main
37 with:
38 ansible-core-version: stable-${{ matrix.ansible }}
39 codecov-token: ${{ secrets.CODECOV_TOKEN }}
40 coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
41 pull-request-change-detection: 'true'
42 testing-type: sanity
43 pre-test-cmd: >-
44 git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
45
46 units:
47 runs-on: ubuntu-latest
48 name: EOL Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
49 strategy:
50 # As soon as the first unit test fails, cancel the others to free up the CI queue
51 fail-fast: true
52 matrix:
53 ansible:
54 - ''
55 python:
56 - ''
57 exclude:
58 - ansible: ''
59 include:
60 - ansible: '2.18'
61 python: '3.8'
62 - ansible: '2.18'
63 python: '3.11'
64 - ansible: '2.18'
65 python: '3.13'
66
67 steps:
68 - name: >-
69 Perform unit testing against
70 Ansible version ${{ matrix.ansible }}
71 uses: felixfontein/ansible-test-gh-action@main
72 with:
73 ansible-core-version: stable-${{ matrix.ansible }}
74 codecov-token: ${{ secrets.CODECOV_TOKEN }}
75 coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
76 pre-test-cmd: >-
77 mkdir -p ../../ansible
78 ;
79 git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
80 pull-request-change-detection: 'true'
81 target-python-version: ${{ matrix.python }}
82 testing-type: units
83
84 integration:
85 runs-on: ubuntu-latest
86 name: EOL I (Ⓐ${{ matrix.ansible }}+${{ matrix.docker }}+py${{ matrix.python }}:${{ matrix.target }})
87 strategy:
88 fail-fast: false
89 matrix:
90 ansible:
91 - ''
92 docker:
93 - ''
94 python:
95 - ''
96 target:
97 - ''
98 exclude:
99 - ansible: ''
100 include:
101 # 2.18
102 - ansible: '2.18'
103 docker: fedora40
104 python: ''
105 target: azp/posix/1/
106 - ansible: '2.18'
107 docker: fedora40
108 python: ''
109 target: azp/posix/2/
110 - ansible: '2.18'
111 docker: fedora40
112 python: ''
113 target: azp/posix/3/
114 - ansible: '2.18'
115 docker: ubuntu2404
116 python: ''
117 target: azp/posix/1/
118 - ansible: '2.18'
119 docker: ubuntu2404
120 python: ''
121 target: azp/posix/2/
122 - ansible: '2.18'
123 docker: ubuntu2404
124 python: ''
125 target: azp/posix/3/
126 - ansible: '2.18'
127 docker: alpine320
128 python: ''
129 target: azp/posix/1/
130 - ansible: '2.18'
131 docker: alpine320
132 python: ''
133 target: azp/posix/2/
134 - ansible: '2.18'
135 docker: alpine320
136 python: ''
137 target: azp/posix/3/
138 # Right now all generic tests are disabled. Uncomment when at least one of them is re-enabled.
139 # - ansible: '2.18'
140 # docker: default
141 # python: '3.8'
142 # target: azp/generic/1/
143 # - ansible: '2.18'
144 # docker: default
145 # python: '3.13'
146 # target: azp/generic/1/
147
148 steps:
149 - name: >-
150 Perform integration testing against
151 Ansible version ${{ matrix.ansible }}
152 under Python ${{ matrix.python }}
153 uses: felixfontein/ansible-test-gh-action@main
154 with:
155 ansible-core-version: stable-${{ matrix.ansible }}
156 codecov-token: ${{ secrets.CODECOV_TOKEN }}
157 coverage: ${{ github.event_name == 'schedule' && 'always' || 'never' }}
158 docker-image: ${{ matrix.docker }}
159 integration-continue-on-error: 'false'
160 integration-diff: 'false'
161 integration-retry-on-error: 'true'
162 # TODO: remove "--branch stable-2" from community.crypto install once we're only using ansible-core 2.17 or newer!
163 pre-test-cmd: >-
164 mkdir -p ../../ansible
165 ;
166 git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git ../../ansible/posix
167 ;
168 git clone --depth=1 --single-branch --branch stable-2 https://github.com/ansible-collections/community.crypto.git ../../community/crypto
169 ;
170 git clone --depth=1 --single-branch https://github.com/ansible-collections/community.docker.git ../../community/docker
171 ;
172 git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ../../community/internal_test_tools
173 pull-request-change-detection: 'true'
174 target: ${{ matrix.target }}
175 target-python-version: ${{ matrix.python }}
176 testing-type: integration