ci: Comply with Ansible partner certification checking#607
Closed
ci: Comply with Ansible partner certification checking#607
Conversation
https://github.com/ansible-collections/partner-certification-checker/blob/main/README.md Unfortunately we cannot use the checkers provided by their team because they assume the git repo is in collection format - you cannot convert to collection format first then point the checkers at that collection. Instead, implement our own checkers that do the same (and more) - check with multiple versions of ansible-lint and ansible-test to ensure we cover: * all supported versions of EL * Automation Hub gating * the latest versions of Ansible, including the latest milestone version This requires the latest version of tox-lsr Signed-off-by: Rich Megginson <[email protected]>
Reviewer's GuideThis PR updates the CI workflows to align with Ansible partner certification expectations by running ansible-lint and ansible-test via tox-lsr across multiple Ansible/ansible-lint versions, and by standardizing all workflows to use the latest tox-lsr from the main branch instead of a pinned release. Sequence diagram for multi-version ansible-lint CI executionsequenceDiagram
actor Developer
participant GitHubActions
participant Job_ansible_lint
participant tox_lsr
participant ansible_lint
participant ansible_core
Developer->>GitHubActions: Push or pull_request
GitHubActions->>Job_ansible_lint: Start workflow ansible-lint.yml
GitHubActions->>Job_ansible_lint: Expand matrix versions
loop for each matrix_version
Job_ansible_lint->>Job_ansible_lint: Update pip and git
Job_ansible_lint->>Job_ansible_lint: Checkout repository
Job_ansible_lint->>Job_ansible_lint: pip install tox-lsr@main
Job_ansible_lint->>tox_lsr: Run tox -e collection,ansible-lint-collection
Note over Job_ansible_lint, tox_lsr: LSR_ANSIBLE_LINT_DEP, LSR_ANSIBLE_LINT_ANSIBLE_DEP,<br>python base set from matrix version
tox_lsr->>ansible_core: Install specified ansible-core version
tox_lsr->>ansible_lint: Install specified ansible-lint version
tox_lsr->>ansible_lint: Run ansible-lint against converted collection
ansible_lint-->>tox_lsr: Lint results
tox_lsr-->>Job_ansible_lint: tox exit status
end
Job_ansible_lint-->>GitHubActions: Matrix job status
GitHubActions-->>Developer: Report CI status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider pinning
tox-lsrto a released tag or commit SHA instead of@mainin all workflows to keep CI runs reproducible and avoid unexpected breakages from upstream changes. - The ansible-lint matrix uses
python: "3.14", which is not yet available onubuntu-latest; you may want to target a currently supported version (e.g. 3.12/3.13) or verify that the runner image actually provides 3.14 to prevent job failures.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider pinning `tox-lsr` to a released tag or commit SHA instead of `@main` in all workflows to keep CI runs reproducible and avoid unexpected breakages from upstream changes.
- The ansible-lint matrix uses `python: "3.14"`, which is not yet available on `ubuntu-latest`; you may want to target a currently supported version (e.g. 3.12/3.13) or verify that the runner image actually provides 3.14 to prevent job failures.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/ansible-collections/partner-certification-checker/blob/main/README.md
Unfortunately we cannot use the checkers provided by their team because they assume
the git repo is in collection format - you cannot convert to collection format first
then point the checkers at that collection. Instead, implement our own checkers that
do the same (and more) - check with multiple versions of ansible-lint and ansible-test
to ensure we cover:
This requires the latest version of tox-lsr
Signed-off-by: Rich Megginson [email protected]
Summary by Sourcery
Update CI workflows to align ansible-lint and ansible-test checks with Ansible partner certification requirements using tox-lsr-driven collection testing.
Enhancements:
CI: