1
1
# README FIRST
2
- # 1. replace "NAMESPACE/COLLECTION_NAME " with the correct name, ie "community/zabbix"
2
+ # 1. replace "community/molecule " with the correct name, ie "community/zabbix"
3
3
# 2. If you don't have unit tests remove that section
4
4
# 3. If your collection depends on other collections ensure they are installed, see "Install collection dependencies"
5
5
# If you need help please ask in #ansible-devel on Freenode IRC
6
6
7
7
name : CI
8
8
on :
9
- # Run CI against all pushes (direct commits) and Pull Requests
10
- - push
11
- - pull_request
9
+ # Run CI against all pushes (direct commits) and Pull Requests
10
+ - push
11
+ - pull_request
12
12
13
13
jobs :
14
14
15
- # ##
16
- # Sanity tests (REQUIRED)
17
- #
18
- # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
15
+ # ##
16
+ # Sanity tests (REQUIRED)
17
+ #
18
+ # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
19
19
20
20
sanity :
21
21
name : Sanity (Ⓐ${{ matrix.ansible }})
@@ -24,19 +24,19 @@ jobs:
24
24
ansible :
25
25
# It's important that Sanity is tested against all stable-X.Y branches
26
26
# Testing against `devel` may fail as new tests are added.
27
- # - stable-2.9 # Only if your collection supports Ansible 2.9
27
+ # - stable-2.9 # Only if your collection supports Ansible 2.9
28
28
- stable-2.10
29
29
- devel
30
30
runs-on : ubuntu-latest
31
31
steps :
32
32
33
33
# ansible-test requires the collection to be in a directory in the form
34
- # .../ansible_collections/NAMESPACE/COLLECTION_NAME /
34
+ # .../ansible_collections/community/molecule /
35
35
36
36
- name : Check out code
37
37
uses : actions/checkout@v2
38
38
with :
39
- path : ansible_collections/NAMESPACE/COLLECTION_NAME
39
+ path : ansible_collections/community/molecule
40
40
41
41
- name : Set up Python
42
42
uses : actions/setup-python@v2
@@ -54,132 +54,126 @@ jobs:
54
54
# and all python versions ansible supports.
55
55
- name : Run sanity tests
56
56
run : ansible-test sanity --docker -v --color
57
- working-directory : ./ansible_collections/NAMESPACE/COLLECTION_NAME
58
-
59
- # ##
60
- # Unit tests (OPTIONAL)
61
- #
62
- # https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
63
-
64
- units :
65
- runs-on : ubuntu-latest
66
- name : Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
67
- strategy :
68
- # As soon as the first unit test fails, cancel the others to free up the CI queue
69
- fail-fast : true
70
- matrix :
71
- ansible :
72
- # - stable-2.9 # Only if your collection supports Ansible 2.9
73
- - stable-2.10
74
- - devel
75
- python :
76
- - 2.6
77
- - 2.7
78
- - 3.5
79
- - 3.6
80
- - 3.7
81
- - 3.8
82
- - 3.9
83
- exclude :
84
- - ansible : stable-2.9
85
- python : 3.9
86
-
87
- steps :
88
- - name : Check out code
89
- uses : actions/checkout@v2
90
- with :
91
- path : ansible_collections/NAMESPACE/COLLECTION_NAME
92
-
93
- - name : Set up Python ${{ matrix.ansible }}
94
- uses : actions/setup-python@v2
95
- with :
96
- python-version : ${{ matrix.python }}
97
-
98
- - name : Install ansible-base (${{ matrix.ansible }})
99
- run : pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
100
-
101
- # OPTIONAL If your unit test requires Python libraries from other collections
102
- # Install them like this
103
- - name : Install collection dependencies
104
- run : ansible-galaxy collection install ansible.netcommon -p .
105
-
106
- # Run the unit tests
107
- - name : Run unit test
108
- run : ansible-test units -v --color --python ${{ matrix.python }} --docker --coverage
109
- working-directory : ./ansible_collections/NAMESPACE/COLLECTION_NAME
110
-
111
- # ansible-test support producing code coverage date
112
- - name : Generate coverage report
113
- run : ansible-test coverage xml -v --requirements --group-by command --group-by version
114
- working-directory : ./ansible_collections/NAMESPACE/COLLECTION_NAME
115
-
116
- # See the reports at https://codecov.io/gh/ansible_collections/GITHUBORG/REPONAME
117
- - uses : codecov/codecov-action@v1
118
- with :
119
- fail_ci_if_error : false
120
-
121
- # ##
122
- # Integration tests (RECOMMENDED)
123
- #
124
- # https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html
125
-
126
-
127
- # If the application you are testing is available as a docker container and you want to test
128
- # multiple versions see the following for an example:
129
- # https://github.com/ansible-collections/community.zabbix/tree/master/.github/workflows
130
-
131
- integration :
132
- runs-on : ubuntu-latest
133
- name : I (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}})
134
- strategy :
135
- fail-fast : false
136
- matrix :
137
- ansible :
138
- # - stable-2.9 # Only if your collection supports Ansible 2.9
139
- - stable-2.10
140
- - devel
141
- python :
142
- - 2.6
143
- - 2.7
144
- - 3.5
145
- - 3.6
146
- - 3.7
147
- - 3.8
148
- - 3.9
149
- exclude :
150
- - ansible : stable-2.9
151
- python : 3.9
152
-
153
- steps :
154
- - name : Check out code
155
- uses : actions/checkout@v2
156
- with :
157
- path : ansible_collections/NAMESPACE/COLLECTION_NAME
158
-
159
- - name : Set up Python ${{ matrix.ansible }}
160
- uses : actions/setup-python@v2
161
- with :
162
- python-version : ${{ matrix.python }}
163
-
164
- - name : Install ansible-base (${{ matrix.ansible }})
165
- run : pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
166
-
167
- # OPTIONAL If your integration test requires Python libraries or modules from other collections
168
- # Install them like this
169
- - name : Install collection dependencies
170
- run : ansible-galaxy collection install ansible.netcommon -p .
171
-
172
- # Run the integration tests
173
- - name : Run integration test
174
- run : ansible-test integration -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker --coverage
175
- working-directory : ./ansible_collections/NAMESPACE/COLLECTION_NAME
176
-
177
- # ansible-test support producing code coverage date
178
- - name : Generate coverage report
179
- run : ansible-test coverage xml -v --requirements --group-by command --group-by version
180
- working-directory : ./ansible_collections/NAMESPACE/COLLECTION_NAME
181
-
182
- # See the reports at https://codecov.io/gh/ansible_collections/GITHUBORG/REPONAME
183
- - uses : codecov/codecov-action@v1
184
- with :
185
- fail_ci_if_error : false
57
+ working-directory : ./ansible_collections/community/molecule
58
+
59
+ # ##
60
+ # Unit tests (OPTIONAL)
61
+ #
62
+ # https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
63
+
64
+ # units:
65
+ # runs-on: ubuntu-latest
66
+ # name: Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
67
+ # strategy:
68
+ # # As soon as the first unit test fails, cancel the others to free up the CI queue
69
+ # fail-fast: true
70
+ # matrix:
71
+ # ansible:
72
+ # - stable-2.9 # Only if your collection supports Ansible 2.9
73
+ # - stable-2.10
74
+ # - devel
75
+ # python:
76
+ # - 3.6
77
+ # - 3.7
78
+ # - 3.8
79
+ # - 3.9
80
+ # exclude:
81
+ # - ansible: stable-2.9
82
+ # python: 3.9
83
+
84
+ # steps:
85
+ # - name: Check out code
86
+ # uses: actions/checkout@v2
87
+ # with:
88
+ # path: ansible_collections/community/molecule
89
+
90
+ # - name: Set up Python ${{ matrix.ansible }}
91
+ # uses: actions/setup-python@v2
92
+ # with:
93
+ # python-version: ${{ matrix.python }}
94
+
95
+ # - name: Install ansible-base (${{ matrix.ansible }})
96
+ # run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
97
+
98
+ # # OPTIONAL If your unit test requires Python libraries from other collections
99
+ # # Install them like this
100
+ # - name: Install collection dependencies
101
+ # run: ansible-galaxy collection install ansible.netcommon -p .
102
+
103
+ # # Run the unit tests
104
+ # - name: Run unit test
105
+ # run: ansible-test units -v --color --python ${{ matrix.python }} --docker --coverage
106
+ # working-directory: ./ansible_collections/community/molecule
107
+
108
+ # # ansible-test support producing code coverage date
109
+ # - name: Generate coverage report
110
+ # run: ansible-test coverage xml -v --requirements --group-by command --group-by version
111
+ # working-directory: ./ansible_collections/community/molecule
112
+
113
+ # # See the reports at https://codecov.io/gh/ansible_collections/GITHUBORG/REPONAME
114
+ # - uses: codecov/codecov-action@v1
115
+ # with:
116
+ # fail_ci_if_error: false
117
+
118
+ # ##
119
+ # Integration tests (RECOMMENDED)
120
+ #
121
+ # https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html
122
+
123
+
124
+ # If the application you are testing is available as a docker container and you want to test
125
+ # multiple versions see the following for an example:
126
+ # https://github.com/ansible-collections/community.zabbix/tree/master/.github/workflows
127
+
128
+ # integration:
129
+ # runs-on: ubuntu-latest
130
+ # name: I (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}})
131
+ # strategy:
132
+ # fail-fast: false
133
+ # matrix:
134
+ # ansible:
135
+ # - stable-2.9 # Only if your collection supports Ansible 2.9
136
+ # - stable-2.10
137
+ # - devel
138
+ # python:
139
+ # - 3.6
140
+ # - 3.7
141
+ # - 3.8
142
+ # - 3.9
143
+ # exclude:
144
+ # - ansible: stable-2.9
145
+ # python: 3.9
146
+
147
+ # steps:
148
+ # - name: Check out code
149
+ # uses: actions/checkout@v2
150
+ # with:
151
+ # path: ansible_collections/community/molecule
152
+
153
+ # - name: Set up Python ${{ matrix.ansible }}
154
+ # uses: actions/setup-python@v2
155
+ # with:
156
+ # python-version: ${{ matrix.python }}
157
+
158
+ # - name: Install ansible-base (${{ matrix.ansible }})
159
+ # run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
160
+
161
+ # # OPTIONAL If your integration test requires Python libraries or modules from other collections
162
+ # # Install them like this
163
+ # # - name: Install collection dependencies
164
+ # # run: ansible-galaxy collection install ansible.netcommon -p .
165
+
166
+ # # Run the integration tests
167
+ # - name: Run integration test
168
+ # run: ansible-test integration -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker --coverage
169
+ # working-directory: ./ansible_collections/community/molecule
170
+
171
+ # # ansible-test support producing code coverage date
172
+ # - name: Generate coverage report
173
+ # run: ansible-test coverage xml -v --requirements --group-by command --group-by version
174
+ # working-directory: ./ansible_collections/community/molecule
175
+
176
+ # # See the reports at https://codecov.io/gh/ansible_collections/GITHUBORG/REPONAME
177
+ # - uses: codecov/codecov-action@v1
178
+ # with:
179
+ # fail_ci_if_error: false
0 commit comments