-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Use supported ansible-lint action; run ansible-lint against the collection #177
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
- Coverage 80.45% 76.53% -3.92%
==========================================
Files 3 3
Lines 133 179 +46
Branches 0 12 +12
==========================================
+ Hits 107 137 +30
- Misses 26 42 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pass | ||
|
||
else: | ||
HAS_PCS = True |
Check notice
Code scanning / CodeQL
Unused global variable Note
|
||
else: | ||
HAS_PCS = True | ||
PCS_IMPORT_ERROR = None |
Check notice
Code scanning / CodeQL
Unused global variable Note
try: | ||
from pcs.common.async_tasks.dto import CommandDto, CommandOptionsDto | ||
except ImportError: | ||
HAS_PCS = False |
Check notice
Code scanning / CodeQL
Unused global variable Note
from pcs.common.async_tasks.dto import CommandDto, CommandOptionsDto | ||
except ImportError: | ||
HAS_PCS = False | ||
PCS_IMPORT_ERROR = traceback.format_exc() |
Check notice
Code scanning / CodeQL
Unused global variable Note
pass | ||
|
||
else: | ||
HAS_PCS = True |
Check notice
Code scanning / CodeQL
Unused global variable Note
|
||
else: | ||
HAS_PCS = True | ||
PCS_IMPORT_ERROR = None |
Check notice
Code scanning / CodeQL
Unused global variable Note
try: | ||
from pcs.common.async_tasks.dto import CommandDto, CommandOptionsDto | ||
except ImportError: | ||
HAS_PCS = False |
Check notice
Code scanning / CodeQL
Unused global variable Note
from pcs.common.async_tasks.dto import CommandDto, CommandOptionsDto | ||
except ImportError: | ||
HAS_PCS = False | ||
PCS_IMPORT_ERROR = traceback.format_exc() |
Check notice
Code scanning / CodeQL
Unused global variable Note
a123f9a
to
9fb67d9
Compare
[citest] |
…ollection The old ansible-community ansible-lint is deprecated. There is a new ansible-lint github action. The new ansible-lint has several checks related to ansible-test and the ignore files. Many of our ignore settings are not allowed any more and are required to be fixed or addressed in the Ansible preferred way. The python imports have to be wrapped in a try/except ImportError, and where possible, an error must be returned from the module explaining what was not able to be imported. The module documentation must comply with the Ansible standards. Because the module code uses mypy, we have to tell ansible-test to ignore some code with `compile-2.7!skip` and `import-x.y!skip`, which ansible-lint does not like, so we have to add ``` skip_list: - sanity[cannot-ignore] ``` to make ansible-lint happy. The latest Ansible repo gating tests run ansible-lint against the collection format instead of against individual roles. We have to convert the role to collection format before running ansible-test. Role developers can run this locally using `tox -e collection,ansible-lint-collection` See linux-system-roles/tox-lsr#125 Add `---` doc start to .markdownlint.yaml Get rid of tests_include_vars_from_parent.yml - does not work anymore Signed-off-by: Rich Megginson <[email protected]>
9fb67d9
to
f10bba4
Compare
[citest] |
The old ansible-community ansible-lint is deprecated. There is a
new ansible-lint github action. The new ansible-lint has several checks
related to ansible-test and the ignore files. Many of our ignore settings
are not allowed any more and are required to be fixed or addressed in the
Ansible preferred way.
The python imports have to be wrapped in a try/except ImportError, and
where possible, an error must be returned from the module explaining
what was not able to be imported.
The module documentation must comply with the Ansible standards.
Because the module code uses mypy, we have to tell ansible-test
to ignore some code with
compile-2.7!skip
andimport-x.y!skip
,which ansible-lint does not like, so we have to add
to make ansible-lint happy.
The latest Ansible repo gating tests run ansible-lint against
the collection format instead of against individual roles.
We have to convert the role to collection format before running
ansible-test.
Role developers can run this locally using
tox -e collection,ansible-lint-collection
See linux-system-roles/tox-lsr#125
Add
---
doc start to .markdownlint.yamlSigned-off-by: Rich Megginson [email protected]