Skip to content

Commit 40f7479

Browse files
author
Poor B
committed
Initial commit
0 parents  commit 40f7479

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+5835
-0
lines changed
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
name: Collection test suite
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: 3 0 * * * # Run daily at 0:03 UTC
8+
9+
jobs:
10+
build-collection-artifact:
11+
name: Build collection
12+
runs-on: ${{ matrix.runner-os }}
13+
strategy:
14+
matrix:
15+
runner-os:
16+
- ubuntu-latest
17+
ansible-version:
18+
- git+https://github.com/ansible/ansible.git@devel
19+
runner-python-version:
20+
- 3.8
21+
steps:
22+
- name: Set up Python ${{ matrix.runner-python-version }}
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.runner-python-version }}
26+
- name: Install Ansible ${{ matrix.ansible-version }}
27+
run: >-
28+
python -m
29+
pip
30+
install
31+
--user
32+
${{ matrix.ansible-version }}
33+
- name: Build a collection tarball
34+
run: >-
35+
~/.local/bin/ansible-galaxy
36+
collection
37+
build
38+
--output-path
39+
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
40+
- name: Store migrated collection artifacts
41+
uses: actions/upload-artifact@v1
42+
with:
43+
name: >-
44+
collection
45+
path: .cache/collection-tarballs
46+
47+
sanity-test-collection-via-vms:
48+
name: Sanity in VM ${{ matrix.os.vm || 'ubuntu-latest' }}
49+
needs:
50+
- build-collection-artifact
51+
runs-on: ${{ matrix.os.vm || 'ubuntu-latest' }}
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
ansible-version:
56+
- git+https://github.com/ansible/ansible.git@devel
57+
os:
58+
- vm: ubuntu-latest
59+
- vm: ubuntu-16.04
60+
- vm: macos-latest
61+
python-version:
62+
- 3.8
63+
- 3.7
64+
- 3.6
65+
- 3.5
66+
- 2.7
67+
steps:
68+
- name: Set up Python ${{ matrix.python-version }}
69+
uses: actions/setup-python@v1
70+
with:
71+
python-version: ${{ matrix.python-version }}
72+
- name: Install Ansible ${{ matrix.ansible-version }}
73+
run: >-
74+
python -m
75+
pip
76+
install
77+
--user
78+
${{ matrix.ansible-version }}
79+
- name: Download migrated collection artifacts
80+
uses: actions/download-artifact@v1
81+
with:
82+
name: >-
83+
collection
84+
path: .cache/collection-tarballs
85+
- name: Install the collection tarball
86+
run: >-
87+
~/.local/bin/ansible-galaxy
88+
collection
89+
install
90+
.cache/collection-tarballs/*.tar.gz
91+
- name: Run collection sanity tests
92+
run: >-
93+
~/.local/bin/ansible-test
94+
sanity
95+
--color
96+
--requirements
97+
--venv
98+
--python
99+
"${{ matrix.python-version }}"
100+
-vvv
101+
working-directory: >-
102+
/${{ runner.os == 'Linux' && 'home' || 'Users' }}/runner/.ansible/collections/ansible_collections/ansible/gitlab
103+
104+
sanity-test-collection-via-containers:
105+
name: Sanity in container via Python ${{ matrix.python-version }}
106+
needs:
107+
- build-collection-artifact
108+
runs-on: ${{ matrix.runner-os }}
109+
strategy:
110+
fail-fast: false
111+
matrix:
112+
runner-os:
113+
- ubuntu-latest
114+
runner-python-version:
115+
- 3.8
116+
ansible-version:
117+
- git+https://github.com/ansible/ansible.git@devel
118+
python-version:
119+
- 3.8
120+
- 2.7
121+
- 3.7
122+
- 3.6
123+
- 3.5
124+
- 2.6
125+
steps:
126+
- name: Set up Python ${{ matrix.runner-python-version }}
127+
uses: actions/setup-python@v1
128+
with:
129+
python-version: ${{ matrix.runner-python-version }}
130+
- name: Install Ansible ${{ matrix.ansible-version }}
131+
run: >-
132+
python -m
133+
pip
134+
install
135+
--user
136+
${{ matrix.ansible-version }}
137+
- name: Download migrated collection artifacts
138+
uses: actions/download-artifact@v1
139+
with:
140+
name: >-
141+
collection
142+
path: .cache/collection-tarballs
143+
- name: Install the collection tarball
144+
run: >-
145+
~/.local/bin/ansible-galaxy
146+
collection
147+
install
148+
.cache/collection-tarballs/*.tar.gz
149+
- name: Run collection sanity tests
150+
run: >-
151+
~/.local/bin/ansible-test
152+
sanity
153+
--color
154+
--requirements
155+
--docker
156+
--python
157+
"${{ matrix.python-version }}"
158+
-vvv
159+
working-directory: >-
160+
/home/runner/.ansible/collections/ansible_collections/ansible/gitlab
161+
162+
unit-test-collection-via-vms:
163+
name: Units in VM ${{ matrix.os.vm || 'ubuntu-latest' }}
164+
needs:
165+
- build-collection-artifact
166+
runs-on: ${{ matrix.os.vm || 'ubuntu-latest' }}
167+
strategy:
168+
fail-fast: false
169+
matrix:
170+
ansible-version:
171+
- git+https://github.com/ansible/ansible.git@devel
172+
os:
173+
- vm: ubuntu-latest
174+
- vm: ubuntu-16.04
175+
- vm: macos-latest
176+
python-version:
177+
- 3.8
178+
- 3.7
179+
- 3.6
180+
- 3.5
181+
- 2.7
182+
steps:
183+
- name: Set up Python ${{ matrix.python-version }}
184+
uses: actions/setup-python@v1
185+
with:
186+
python-version: ${{ matrix.python-version }}
187+
- name: Install Ansible ${{ matrix.ansible-version }}
188+
run: >-
189+
python -m
190+
pip
191+
install
192+
--user
193+
${{ matrix.ansible-version }}
194+
- name: Download migrated collection artifacts
195+
uses: actions/download-artifact@v1
196+
with:
197+
name: >-
198+
collection
199+
path: .cache/collection-tarballs
200+
- name: Install the collection tarball
201+
run: >-
202+
~/.local/bin/ansible-galaxy
203+
collection
204+
install
205+
.cache/collection-tarballs/*.tar.gz
206+
- name: Run collection unit tests
207+
run: |
208+
[[ ! -d 'tests/unit' ]] && echo This collection does not have unit tests. Skipping... || \
209+
~/.local/bin/ansible-test units --color --coverage --requirements --venv --python "${{ matrix.python-version }}" -vvv
210+
working-directory: >-
211+
/${{ runner.os == 'Linux' && 'home' || 'Users' }}/runner/.ansible/collections/ansible_collections/ansible/gitlab
212+
213+
unit-test-collection-via-containers:
214+
name: Units in container ${{ matrix.container-image }}
215+
needs:
216+
- build-collection-artifact
217+
runs-on: ${{ matrix.runner-os }}
218+
strategy:
219+
fail-fast: false
220+
matrix:
221+
runner-os:
222+
- ubuntu-latest
223+
runner-python-version:
224+
- 3.8
225+
ansible-version:
226+
- git+https://github.com/ansible/ansible.git@devel
227+
container-image:
228+
- fedora31
229+
- ubuntu1804
230+
- centos8
231+
- opensuse15
232+
- fedora30
233+
- centos7
234+
- opensuse15py2
235+
- ubuntu1604
236+
- centos6
237+
steps:
238+
- name: Set up Python ${{ matrix.runner-python-version }}
239+
uses: actions/setup-python@v1
240+
with:
241+
python-version: ${{ matrix.runner-python-version }}
242+
- name: Install Ansible ${{ matrix.ansible-version }}
243+
run: >-
244+
python -m
245+
pip
246+
install
247+
--user
248+
${{ matrix.ansible-version }}
249+
- name: Download migrated collection artifacts
250+
uses: actions/download-artifact@v1
251+
with:
252+
name: >-
253+
collection
254+
path: .cache/collection-tarballs
255+
- name: Install the collection tarball
256+
run: >-
257+
~/.local/bin/ansible-galaxy
258+
collection
259+
install
260+
.cache/collection-tarballs/*.tar.gz
261+
- name: Run collection unit tests
262+
run: |
263+
[[ ! -d 'tests/unit' ]] && echo This collection does not have unit tests. Skipping... || \
264+
~/.local/bin/ansible-test units --color --coverage --requirements --docker "${{ matrix.container-image }}" -vvv
265+
working-directory: >-
266+
/home/runner/.ansible/collections/ansible_collections/ansible/gitlab

0 commit comments

Comments
 (0)