44 push :
55 branches :
66 - master
7- pull_request :
87 schedule :
98 - cron : 30 6 * * *
109
1110jobs :
12- build-collection-artifact :
13- name : Build collection
14- runs-on : ${{ matrix.runner-os }}
15- strategy :
16- matrix :
17- runner-os :
18- - ubuntu-latest
19- ansible-version :
20- - git+https://github.com/ansible/ansible.git@devel
21- runner-python-version :
22- - 3.8
23- steps :
24- - uses : actions/checkout@v1
25- - name : Set up Python ${{ matrix.runner-python-version }}
26- uses : actions/setup-python@v1
27- with :
28- python-version : ${{ matrix.runner-python-version }}
29- - name : Set up pip cache
30- uses : actions/cache@v1
31- with :
32- path : ~/.cache/pip
33- key : ${{ runner.os }}-pip-${{ github.ref }}
34- - name : Install Ansible ${{ matrix.ansible-version }}
35- run : >-
36- python -m
37- pip
38- install
39- --user
40- ${{ matrix.ansible-version }}
41- - name : Build a collection tarball
42- run : >-
43- ~/.local/bin/ansible-galaxy
44- collection
45- build
46- --output-path
47- "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
48- - name : Store migrated collection artifacts
49- uses : actions/upload-artifact@v1
50- with :
51- name : >-
52- collection
53- path : .cache/collection-tarballs
54-
55- sanity-test-collection-via-containers :
56- name : Sanity Py${{ matrix.python-version }}
57- needs :
58- - build-collection-artifact
59- runs-on : ${{ matrix.runner-os }}
60- strategy :
61- fail-fast : false
62- matrix :
63- runner-os :
64- - ubuntu-latest
65- runner-python-version :
66- - 3.6
67- ansible-version :
68- - git+https://github.com/ansible/ansible.git@devel
69- steps :
70- - name : Set up Python ${{ matrix.runner-python-version }}
71- uses : actions/setup-python@v1
72- with :
73- python-version : ${{ matrix.runner-python-version }}
74- - name : Set up pip cache
75- uses : actions/cache@v1
76- with :
77- path : ~/.cache/pip
78- key : ${{ runner.os }}-pip-${{ github.ref }}-sanity-containers
79- restore-keys : |
80- ${{ runner.os }}-pip-
81- ${{ runner.os }}-
82- - name : Install Ansible ${{ matrix.ansible-version }}
83- run : >-
84- python -m
85- pip
86- install
87- --user
88- ${{ matrix.ansible-version }}
89- - name : Download migrated collection artifacts
90- uses : actions/download-artifact@v1
91- with :
92- name : >-
93- collection
94- path : .cache/collection-tarballs
95- - name : Install the collection tarball
96- run : >-
97- ~/.local/bin/ansible-galaxy
98- collection
99- install
100- .cache/collection-tarballs/*.tar.gz
101- - name : Run collection sanity tests
102- run : >-
103- ~/.local/bin/ansible-test
104- sanity
105- --color
106- --requirements
107- --docker
108- -vvv
109- working-directory : >-
110- /home/runner/.ansible/collections/ansible_collections/ngine_io/cloudstack
111-
11211 integration-test :
11312 name : Integration test group${{matrix.group}} Py${{ matrix.python-version }}
114- needs :
115- - build-collection-artifact
116- - sanity-test-collection-via-containers
117- runs-on : ${{ matrix.runner-os }}
13+ runs-on : ubuntu-latest
11814 strategy :
11915 fail-fast : false
12016 matrix :
121- runner-os :
122- - ubuntu-latest
123- runner-python-version :
124- - 3.6
125- ansible-version :
126- - git+https://github.com/ansible/ansible.git@devel
12717 python-version :
12818 - 3.6
12919 - 2.7
@@ -135,40 +25,26 @@ jobs:
13525 uses : actions/checkout@v1
13626 with :
13727 path : ansible_collections/ngine_io/cloudstack
138- - name : Set up pip cache
139- uses : actions/cache@v1
140- with :
141- path : ~/.cache/pip
142- key : ${{ runner.os }}-pip-${{ github.ref }}
143- - name : Install Ansible ${{ matrix.ansible-version }}
144- run : >-
145- python -m
146- pip
147- install
148- --user
149- ${{ matrix.ansible-version }}
150- - name : Install requirements
151- run : >-
152- python -m
153- pip
154- install
155- --user
156- -r requirements.txt
157- - name : Download migrated collection artifacts
158- uses : actions/download-artifact@v1
28+
29+ - name : Set up Python ${{ matrix.python-version }}
30+ uses : actions/setup-python@v1
15931 with :
160- name : >-
161- collection
162- path : .cache/collection-tarballs
163- - name : Install collection tarball
164- run : >-
165- ~/.local/bin/ansible-galaxy
166- collection
167- install
168- ${GITHUB_WORKSPACE}/.cache/collection-tarballs/*.gz
32+ python-version : ${{ matrix.python-version }}
33+
34+ - name : Install ansible and collection dependencies
35+ run : |
36+ python -m pip install --upgrade pip
37+ pip install ansible
38+ pip install -r requirements.txt
39+
40+ - name : Build and install collection
41+ run : |
42+ ansible-galaxy collection build .
43+ ansible-galaxy collection install *.gz
44+
16945 - name : Run the tests
17046 run : >-
171- ~/.local/bin/ ansible-test
47+ ansible-test
17248 integration
17349 --docker
17450 -v
@@ -179,9 +55,10 @@ jobs:
17955 --continue-on-error
18056 --coverage
18157 shippable/cs/group${{ matrix.group }}/
58+
18259 - name : Generate coverage report.
18360 run : >-
184- ~/.local/bin/ ansible-test
61+ ansible-test
18562 coverage xml
18663 -v
18764 --requirements
0 commit comments