ci: Comply with Ansible partner certification checking [citest_skip]#306
Merged
ci: Comply with Ansible partner certification checking [citest_skip]#306
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 <rmeggins@redhat.com>
Reviewer's GuideUpdates CI workflows to align with Ansible partner certification expectations by running ansible-lint and ansible-test via tox/tox-lsr across multiple Ansible/Python versions, and bumps tox-lsr to 3.18.0 in all workflows. Sequence diagram for updated ansible-lint CI job with version matrixsequenceDiagram
actor Developer
participant GitHub
participant Workflow_ansible_lint as Workflow_ansible_lint_yml
participant Runner as Actions_runner
participant tox_lsr as tox_lsr_3_18_0
participant tox
participant ansible_lint as ansible_lint_matrix_version
participant ansible_core as ansible_core_matrix_version
Developer->>GitHub: Push commit or open PR
GitHub->>Workflow_ansible_lint: Trigger workflow (no citest_skip)
Workflow_ansible_lint->>Runner: Start job ansible-lint with matrix
loop For each matrix version
Runner->>Runner: Set matrix vars (ansible_lint, ansible_core, python)
Runner->>Runner: Setup Python version from matrix
Runner->>tox_lsr: pip install tox-lsr 3.18.0
Runner->>tox: Run tox with env collection and ansible-lint-collection
tox->>ansible_core: Install ansible-core==matrix.ansible
tox->>ansible_lint: Install ansible-lint==matrix.ansible_lint
tox->>tox_lsr: Use collection testenv definitions
tox->>ansible_lint: Execute ansible-lint on converted collection
ansible_lint-->>tox: Lint results
tox-->>Runner: Job status for this matrix version
end
Runner-->>Workflow_ansible_lint: Combined matrix result
Workflow_ansible_lint-->>GitHub: Report CI status
GitHub-->>Developer: Show ansible-lint checks per version
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:
- The ansible/ansible‑test version matrices are hard‑coded in the workflow; consider moving these into tox/lsr configuration (or a small shared YAML anchor/reusable workflow) so version changes only need to be updated in one place.
- The tox‑lsr git ref (3.18.0) is duplicated across multiple workflows; factoring this into a single reusable workflow or a shared environment variable will reduce the risk of the workflows drifting out of sync on future updates.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The ansible/ansible‑test version matrices are hard‑coded in the workflow; consider moving these into tox/lsr configuration (or a small shared YAML anchor/reusable workflow) so version changes only need to be updated in one place.
- The tox‑lsr git ref (3.18.0) is duplicated across multiple workflows; factoring this into a single reusable workflow or a shared environment variable will reduce the risk of the workflows drifting out of sync on future updates.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 rmeggins@redhat.com
Summary by Sourcery
Align CI linting and testing workflows with Ansible partner certification requirements by driving ansible-lint and ansible-test through tox across multiple supported Ansible and Python versions.
CI: