Skip to content

Commit 3d06205

Browse files
samiiblhercot
authored andcommitted
[ignore] Fix linting issues with new galaxy-importer version
1 parent aef8d37 commit 3d06205

24 files changed

+280
-272
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
blank_issues_enabled: false
1+
blank_issues_enabled: false

.github/workflows/ansible-test.yml

Lines changed: 158 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: CI
22
on:
33
push:
4-
branches: master
4+
branches: [master]
55
pull_request:
66
schedule:
7-
# * is a special character in YAML so you have to quote this string
8-
- cron: '0 8 * * *'
7+
# * is a special character in YAML so you have to quote this string
8+
- cron: '0 8 * * *'
99
env:
1010
python_version: '3.10'
1111
jobs:
@@ -17,25 +17,25 @@ jobs:
1717
matrix:
1818
ansible: [v2.14.13, v2.15.8, v2.16.2, stable-2.16]
1919
steps:
20-
- name: Check out code
21-
uses: actions/checkout@v3
22-
23-
- name: Set up Python ${{ env.python_version }}
24-
uses: actions/setup-python@v4
25-
with:
26-
python-version: ${{ env.python_version }}
27-
28-
- name: Install ansible-base (${{ matrix.ansible }})
29-
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
30-
31-
- name: Build a collection tarball
32-
run: ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
33-
34-
- name: Store migrated collection artifacts
35-
uses: actions/upload-artifact@v3
36-
with:
37-
name: collection
38-
path: .cache/collection-tarballs
20+
- name: Check out code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Python ${{ env.python_version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ env.python_version }}
27+
28+
- name: Install ansible-base (${{ matrix.ansible }})
29+
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
30+
31+
- name: Build a collection tarball
32+
run: ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
33+
34+
- name: Store migrated collection artifacts
35+
uses: actions/upload-artifact@v3
36+
with:
37+
name: collection
38+
path: .cache/collection-tarballs
3939

4040
black-formating:
4141
name: Using Black to check formating
@@ -57,120 +57,126 @@ jobs:
5757
importer:
5858
name: Galaxy-importer check
5959
needs:
60-
- build
60+
- build
6161
runs-on: ubuntu-latest
6262
steps:
63-
- name: Set up Python ${{ env.python_version }}
64-
uses: actions/setup-python@v4
65-
with:
66-
python-version: ${{ env.python_version }}
63+
- name: Set up Python ${{ env.python_version }}
64+
uses: actions/setup-python@v4
65+
with:
66+
python-version: ${{ env.python_version }}
6767

68-
- name: Install ansible-base (v2.15.8)
69-
run: pip install https://github.com/ansible/ansible/archive/v2.15.8.tar.gz --disable-pip-version-check
68+
- name: Install ansible-base (v2.15.8)
69+
run: pip install https://github.com/ansible/ansible/archive/v2.15.8.tar.gz --disable-pip-version-check
7070

71-
- name: Download migrated collection artifacts
72-
uses: actions/download-artifact@v3
73-
with:
74-
name: collection
75-
path: .cache/collection-tarballs
71+
- name: Download migrated collection artifacts
72+
uses: actions/download-artifact@v3
73+
with:
74+
name: collection
75+
path: .cache/collection-tarballs
7676

77-
- name: Install the collection tarball
78-
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
77+
- name: Install the collection tarball
78+
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
7979

80-
- name: Install galaxy-importer (v0.4.20)
81-
run: pip install galaxy-importer==0.4.20
80+
- name: Install galaxy-importer
81+
run: pip install galaxy-importer
8282

83-
- name: Create galaxy-importer directory
84-
run: sudo mkdir -p /etc/galaxy-importer
83+
- name: Create galaxy-importer directory
84+
run: sudo mkdir -p /etc/galaxy-importer
8585

86-
- name: Create galaxy-importer.cfg
87-
run: sudo cp /home/runner/.ansible/collections/ansible_collections/cisco/aci/.github/workflows/galaxy-importer.cfg /etc/galaxy-importer/galaxy-importer.cfg
86+
- name: Create galaxy-importer.cfg
87+
run: |
88+
sudo cp \
89+
/home/runner/.ansible/collections/ansible_collections/cisco/aci/.github/workflows/galaxy-importer.cfg \
90+
/etc/galaxy-importer/galaxy-importer.cfg
8891
89-
- name: Run galaxy-importer check
90-
run: python -m galaxy_importer.main .cache/collection-tarballs/cisco-*.tar.gz | tee .cache/collection-tarballs/log.txt && sudo cp ./importer_result.json .cache/collection-tarballs/importer_result.json
92+
- name: Run galaxy-importer check
93+
run: |
94+
python -m galaxy_importer.main .cache/collection-tarballs/cisco-*.tar.gz \
95+
| tee .cache/collection-tarballs/log.txt \
96+
&& sudo cp ./importer_result.json .cache/collection-tarballs/importer_result.json
9197
92-
- name: Check warnings and errors
93-
run: if grep -E 'WARNING|ERROR' .cache/collection-tarballs/log.txt; then exit 1; else exit 0; fi
98+
- name: Check warnings and errors
99+
run: if grep -E 'WARNING|ERROR' .cache/collection-tarballs/log.txt; then exit 1; else exit 0; fi
94100

95-
- name: Store galaxy_importer check log file
96-
uses: actions/upload-artifact@v3
97-
with:
98-
name: galaxy-importer-log
99-
path: .cache/collection-tarballs/importer_result.json
101+
- name: Store galaxy_importer check log file
102+
uses: actions/upload-artifact@v3
103+
with:
104+
name: galaxy-importer-log
105+
path: .cache/collection-tarballs/importer_result.json
100106

101107

102108
sanity:
103109
name: Sanity in ubuntu-latest
104110
needs:
105-
- build
111+
- build
106112
runs-on: ubuntu-latest
107113
strategy:
108114
fail-fast: false
109115
matrix:
110116
ansible: [v2.14.13, v2.15.8, v2.16.2, stable-2.16]
111117
steps:
112-
- name: Set up Python ${{ env.python_version }}
113-
uses: actions/setup-python@v4
114-
with:
115-
python-version: ${{ env.python_version }}
116-
117-
- name: Install ansible-base (${{ matrix.ansible }})
118-
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
119-
120-
- name: Install coverage (v4.5.4)
121-
run: pip install coverage==4.5.4
122-
123-
- name: Download migrated collection artifacts
124-
uses: actions/download-artifact@v3
125-
with:
126-
name: collection
127-
path: .cache/collection-tarballs
128-
129-
- name: Install the collection tarball
130-
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
131-
132-
- name: Run sanity tests
133-
run: ansible-test sanity --docker -v --color --truncate 0 --coverage
134-
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
135-
136-
- name: Generate coverage report
137-
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
138-
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
139-
140-
- name: Push coverate report to codecov.io
141-
run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F sanity
142-
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
118+
- name: Set up Python ${{ env.python_version }}
119+
uses: actions/setup-python@v4
120+
with:
121+
python-version: ${{ env.python_version }}
122+
123+
- name: Install ansible-base (${{ matrix.ansible }})
124+
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
125+
126+
- name: Install coverage (v4.5.4)
127+
run: pip install coverage==4.5.4
128+
129+
- name: Download migrated collection artifacts
130+
uses: actions/download-artifact@v3
131+
with:
132+
name: collection
133+
path: .cache/collection-tarballs
134+
135+
- name: Install the collection tarball
136+
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
137+
138+
- name: Run sanity tests
139+
run: ansible-test sanity --docker -v --color --truncate 0 --coverage
140+
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
141+
142+
- name: Generate coverage report
143+
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
144+
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
145+
146+
- name: Push coverate report to codecov.io
147+
run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F sanity
148+
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
143149

144150
units:
145151
name: Units in ubuntu-latest
146152
needs:
147-
- build
153+
- build
148154
runs-on: ubuntu-latest
149155
strategy:
150156
fail-fast: false
151157
matrix:
152158
ansible: [v2.14.13, v2.15.8, v2.16.2, stable-2.16]
153159
python-version: ['3.10']
154160
steps:
155-
- name: Set up Python ${{ matrix.python-version }}
156-
uses: actions/setup-python@v4
157-
with:
158-
python-version: ${{ matrix.python-version }}
161+
- name: Set up Python ${{ matrix.python-version }}
162+
uses: actions/setup-python@v4
163+
with:
164+
python-version: ${{ matrix.python-version }}
159165

160-
- name: Install ansible-base (${{ matrix.ansible }})
161-
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
166+
- name: Install ansible-base (${{ matrix.ansible }})
167+
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
162168

163-
- name: Install coverage (v4.5.4)
164-
run: pip install coverage==4.5.4
169+
- name: Install coverage (v4.5.4)
170+
run: pip install coverage==4.5.4
165171

166-
- name: Download migrated collection artifacts
167-
uses: actions/download-artifact@v3
168-
with:
169-
name: collection
170-
path: .cache/collection-tarballs
172+
- name: Download migrated collection artifacts
173+
uses: actions/download-artifact@v3
174+
with:
175+
name: collection
176+
path: .cache/collection-tarballs
171177

172-
- name: Install the collection tarball
173-
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
178+
- name: Install the collection tarball
179+
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
174180

175181
# - name: Run unit tests
176182
# run: ansible-test units --docker -v --color --truncate 0 --python ${{ matrix.python-version }} --coverage
@@ -187,54 +193,58 @@ jobs:
187193
integration:
188194
name: Integration in ubuntu-latest
189195
needs:
190-
- build
196+
- build
191197
runs-on: ubuntu-latest
198+
env:
199+
MUTEX_URL: https://8v7s765ibh.execute-api.us-west-1.amazonaws.com
192200
steps:
193-
- name: Set up Python ${{ env.python_version }}
194-
uses: actions/setup-python@v4
195-
with:
196-
python-version: ${{ env.python_version }}
197-
198-
- name: Install ansible-base (v2.15.8)
199-
run: pip install https://github.com/ansible/ansible/archive/v2.15.8.tar.gz --disable-pip-version-check
200-
201-
- name: Install coverage (v4.5.4)
202-
run: pip install coverage==4.5.4
203-
204-
- name: Download migrated collection artifacts
205-
uses: actions/download-artifact@v3
206-
with:
207-
name: collection
208-
path: .cache/collection-tarballs
209-
210-
- name: Install the collection tarball
211-
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
212-
213-
- name: Requesting integration mutex
214-
uses: nev7n/wait_for_response@v1
215-
with:
216-
url: ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci?repo={0}&run_id={1}', github.repository, github.run_id) }}
217-
responseCode: 200
218-
timeout: 2000000
219-
interval: 5000
220-
221-
- name: Run integration tests on Python ${{ env.python_version }}
222-
run: ansible-test network-integration --docker -v --color --retry-on-error --python ${{ env.python_version }} --truncate 0 --continue-on-error --coverage
223-
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
224-
225-
- name: Releasing integration mutex
226-
uses: nev7n/wait_for_response@v1
227-
if: always()
228-
with:
229-
url: ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci/release?repo={0}&run_id={1}', github.repository, github.run_id) }}
230-
responseCode: 200
231-
232-
- name: Generate coverage report
233-
if: always()
234-
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
235-
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
236-
237-
- name: Push coverate report to codecov.io
238-
if: always()
239-
run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
240-
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
201+
- name: Set up Python ${{ env.python_version }}
202+
uses: actions/setup-python@v4
203+
with:
204+
python-version: ${{ env.python_version }}
205+
206+
- name: Install ansible-base (v2.15.8)
207+
run: pip install https://github.com/ansible/ansible/archive/v2.15.8.tar.gz --disable-pip-version-check
208+
209+
- name: Install coverage (v4.5.4)
210+
run: pip install coverage==4.5.4
211+
212+
- name: Download migrated collection artifacts
213+
uses: actions/download-artifact@v3
214+
with:
215+
name: collection
216+
path: .cache/collection-tarballs
217+
218+
- name: Install the collection tarball
219+
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
220+
221+
- name: Requesting integration mutex
222+
uses: nev7n/wait_for_response@v1
223+
with:
224+
url: ${{ format('{0}/v1/ansible-aci?repo={1}&run_id={2}', env.MUTEX_URL, github.repository, github.run_id) }}
225+
responseCode: 200
226+
timeout: 2000000
227+
interval: 5000
228+
229+
- name: Run integration tests on Python ${{ env.python_version }}
230+
run: |
231+
ansible-test network-integration --docker -v --color --retry-on-error --python ${{ env.python_version }} \
232+
--truncate 0 --continue-on-error --coverage
233+
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
234+
235+
- name: Releasing integration mutex
236+
uses: nev7n/wait_for_response@v1
237+
if: always()
238+
with:
239+
url: ${{ format('{0}/v1/ansible-aci/release?repo={1}&run_id={2}', env.MUTEX_URL, github.repository, github.run_id) }}
240+
responseCode: 200
241+
242+
- name: Generate coverage report
243+
if: always()
244+
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
245+
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
246+
247+
- name: Push coverate report to codecov.io
248+
if: always()
249+
run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
250+
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci

0 commit comments

Comments
 (0)