-
Notifications
You must be signed in to change notification settings - Fork 11
190 lines (180 loc) · 6.25 KB
/
test-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
---
name: 🧪
on: # yamllint disable-line rule:truthy
merge_group:
push:
branches-ignore:
- gh-readonly-queue/** # Temporary merge queue-related GH-made branches
pull_request:
jobs:
tests:
name: >-
Ⓐ${{ matrix.ansible-core-version }}
@
🐍${{ matrix.origin-python-version }}:
${{ matrix.testing-type }}
runs-on: ubuntu-latest
timeout-minutes: 3
services:
httpbin:
image: kennethreitz/httpbin
strategy:
fail-fast: false
matrix:
ansible-core-version:
- ''
collection-root:
- ''
collection-src-directory:
- ''
docker-image:
- default
git-checkout-ref:
- ''
integration-continue-on-error:
- ''
integration-diff:
- ''
integration-retry-on-error:
- ''
origin-python-version:
- ''
pre-action-cmd:
- ''
pre-test-cmd:
- ''
pull-request-change-detection:
- ''
target:
- ''
target-python-version:
- ''
test-deps:
- ''
testing-type:
- ''
coverage:
- auto
exclude:
- ansible-core-version: ''
include:
- ansible-core-version: stable-2.11
origin-python-version: '3.8'
testing-type: sanity
collection-root: .
collection-src-directory: ./.tmp-action-checkout
coverage: auto
integration-continue-on-error: true
integration-diff: true
integration-retry-on-error: true
pre-action-cmd: >-
mv -v
.internal/ansible/ansible_collections/internal/test/galaxy.yml .
pre-test-cmd: rm -rfv .internal/
- ansible-core-version: stable-2.12
collection-root: .internal/ansible/ansible_collections/internal/test
collection-src-directory: ./.tmp-action-checkout
coverage: never
integration-continue-on-error: true
integration-diff: true
integration-retry-on-error: true
origin-python-version: auto
testing-type: sanity
- ansible-core-version: devel
collection-root: .internal/ansible/ansible_collections/internal/test
collection-src-directory: ./.tmp-action-checkout
coverage: always
integration-continue-on-error: true
integration-diff: true
integration-retry-on-error: true
origin-python-version: auto
testing-type: units
- ansible-core-version: stable-2.13
collection-root: .internal/ansible/ansible_collections/internal/test
# NOTE: A missing `collection-src-directory` input causes
# NOTE: fetching the repo from GitHub.
coverage: auto
integration-continue-on-error: false
integration-diff: true
integration-retry-on-error: true
origin-python-version: '3.9'
pull-request-change-detection: 'true'
testing-type: integration
- ansible-core-version: stable-2.13
collection-root: .internal/ansible/ansible_collections/internal/test
# NOTE: A missing `collection-src-directory` input causes
# NOTE: fetching the repo from GitHub.
coverage: auto
integration-continue-on-error: true
integration-diff: true
integration-retry-on-error: false
origin-python-version: auto
testing-type: integration
test-deps: >-
--no-deps
git+https://github.com/ansible-collections/ansible.netcommon.git
- ansible-core-version: stable-2.14
collection-root: .internal/ansible/ansible_collections/internal/test
collection-src-directory: ./.tmp-action-checkout
coverage: auto
integration-continue-on-error: true
integration-diff: false
integration-retry-on-error: true
origin-python-version: >-
3.10
testing-type: integration
test-deps: >-
git+https://github.com/ansible-collections/ansible.utils.git
git+https://github.com/ansible-collections/ansible.netcommon.git
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: .tmp-action-checkout/
- name: Run a pre-action command
if: matrix.pre-action-cmd
run: ${{ matrix.pre-action-cmd }}
working-directory: ./.tmp-action-checkout/
- name: Run ${{ matrix.testing-type }} tests
id: tests
uses: ./.tmp-action-checkout/
with:
ansible-core-version: ${{ matrix.ansible-core-version }}
collection-root: ${{ matrix.collection-root }}
collection-src-directory: ${{ matrix.collection-src-directory }}
coverage: ${{ matrix.coverage }}
docker-image: ${{ matrix.docker-image }}
git-checkout-ref: ${{ matrix.git-checkout-ref }}
integration-continue-on-error: >-
${{ matrix.integration-continue-on-error || 'true' }}
integration-diff: ${{ matrix.integration-diff || 'true' }}
integration-retry-on-error: >-
${{ matrix.integration-retry-on-error || 'true' }}
origin-python-version: ${{ matrix.origin-python-version }}
pre-test-cmd: ${{ matrix.pre-test-cmd }}
pull-request-change-detection: >-
${{ matrix.pull-request-change-detection || 'false' }}
target: ${{ matrix.target }}
target-python-version: ${{ matrix.target-python-version }}
testing-type: ${{ matrix.testing-type }}
test-deps: ${{ matrix.test-deps }}
- name: 📝 Log all the action outputs
run: |
echo '# 🤖 Action outputs as JSON:' >> "${GITHUB_STEP_SUMMARY}"
echo >> "${GITHUB_STEP_SUMMARY}"
echo '```json' >> "${GITHUB_STEP_SUMMARY}"
echo '${{ toJSON(steps.tests.outputs) }}' \
| tee -a "${GITHUB_STEP_SUMMARY}"
echo '```' >> "${GITHUB_STEP_SUMMARY}"
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- tests
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
...