Skip to content
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 new ansible-lint action, which requires collection format and 2.16 #668

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

richm
Copy link
Contributor

@richm richm commented Jan 6, 2024

The old ansible-community ansible-lint github action is deprecated.
There is a new ansible-lint github action called ansible/ansible-lint.
However, this version requires a collection, so we have to convert
the role to collection format before running the ansible-lint action.

tox-lsr has been updated to use ansible-core 2.16 for ansible-lint and
ansible-test.

This also requires tox-lsr 3.2.1 - bump other actions to use 3.2.1

Role developers can run this locally using
tox -e collection,ansible-lint-collection
See linux-system-roles/tox-lsr#125

…ollection

The old ansible-community ansible-lint is deprecated.  There is a
new ansible-lint github action.

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.

This also requires tox-lsr 3.2.1 - bump other actions to use 3.2.1

Role developers can run this locally using
`tox -e collection,ansible-lint-collection`
See linux-system-roles/tox-lsr#125

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm requested a review from liangwen12year as a code owner January 6, 2024 01:49
Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e4d4997) 45.03% compared to head (f6f4d98) 45.03%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #668   +/-   ##
=======================================
  Coverage   45.03%   45.03%           
=======================================
  Files          12       12           
  Lines        3080     3080           
  Branches      428      428           
=======================================
  Hits         1387     1387           
  Misses       1692     1692           
  Partials        1        1           
Flag Coverage Δ
sanity 20.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@richm richm enabled auto-merge January 8, 2024 18:18
@richm richm closed this Jan 8, 2024
auto-merge was automatically disabled January 8, 2024 18:18

Pull request was closed

@richm richm deleted the new-ansible-lint-collection branch January 8, 2024 18:18
@richm richm restored the new-ansible-lint-collection branch January 8, 2024 18:18
@richm richm reopened this Jan 8, 2024
Copy link
Collaborator

@liangwen12year liangwen12year left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run the test locally with tox -e collection,ansible-lint-collection, and did not find the problem. But I notice that the commit has the same subject as the the commit in #661.

@liangwen12year
Copy link
Collaborator

liangwen12year commented Jan 11, 2024

I run the test locally with tox -e collection,ansible-lint-collection, and did not find the problem. But I notice that the commit has the same subject as the the commit in #661.

Maybe just add a line to the commit message to highlight that this PR is about updating the github action to use new ansible-lint and ansible-test 2.16.

@richm richm changed the title ci: Use supported ansible-lint action; run ansible-lint against the collection ci: Use new ansible-lint action, which requires collection format and 2.16 Jan 11, 2024
@richm richm merged commit 735d4be into main Jan 12, 2024
46 checks passed
@richm richm deleted the new-ansible-lint-collection branch January 12, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants