Skip to content

Commit c5e84da

Browse files
committed
[ignore] Fix Ansible Galaxy check failing on ignore warning files.
1 parent 361d124 commit c5e84da

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/ansible-test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,16 @@ jobs:
9696
&& sudo cp ./importer_result.json .cache/collection-tarballs/importer_result.json
9797
9898
- name: Check warnings and errors
99-
run: if grep -E 'WARNING|ERROR' .cache/collection-tarballs/log.txt; then exit 1; else exit 0; fi
99+
shell: python
100+
run: |
101+
err_count = 0
102+
with open('.cache/collection-tarballs/log.txt', 'r', encoding='utf-8') as f:
103+
for line in f:
104+
if line.startswith('ERROR:') or line.startswith('WARNING:'):
105+
print(line)
106+
if 'Ignore files skip ansible-test sanity tests, found ignore' not in line:
107+
err_count += 1
108+
exit(err_count)
100109
101110
- name: Store galaxy_importer check log file
102111
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)