ci: Comply with Ansible partner certification checking [citest_skip]#343
Merged
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-lsr across multiple Ansible/Python versions and by upgrading tox-lsr to 3.18.0 everywhere. Sequence diagram for updated ansible-lint CI job using tox-lsr matrixsequenceDiagram
participant GitHub as GitHub_Actions
participant Job as ansible-lint_job
participant Matrix as lint_matrix_entry
participant Py as setup-python_action
participant ToxLSR as tox-lsr_3_18_0
participant Tox as tox
participant Lint as ansible-lint
participant Core as ansible-core
GitHub->>Job: trigger_on_PR_or_push
Job->>Job: expand_matrix_versions
Job->>Matrix: select_versions(ansible_lint_version, ansible_core_version, python_version)
Job->>ToxLSR: pip_install(tox-lsr_3_18_0)
Job->>Py: setup_python(python_version)
Job->>Tox: run_tox(env=collection,ansible-lint-collection,LSR_ANSIBLE_LINT_DEP,LSR_ANSIBLE_LINT_ANSIBLE_DEP,ansible-lint-collection.basepython)
Tox->>Core: install(ansible-core==matrix.ansible_core_version)
Tox->>Lint: install(ansible-lint==matrix.ansible_lint_version)
Tox->>Lint: execute_ansible-lint_on_collection
Lint-->>Tox: lint_results
Tox-->>Job: tox_exit_status
Job-->>GitHub: report_check_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:
- The previous ansible-lint workflow merged
meta/collection-requirements.ymlandtests/collection-requirements.yml; if both files are still expected to be honored, consider replicating that merge behavior inside the tox/lsr pipeline to avoid silently dropping dependencies. - The
git+https://github.com/linux-system-roles/tox-lsr@3.18.0reference is duplicated across several workflows; consider centralizing this (e.g., via a reusable workflow or shared action) so future version bumps only need to be made in one place.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The previous ansible-lint workflow merged `meta/collection-requirements.yml` and `tests/collection-requirements.yml`; if both files are still expected to be honored, consider replicating that merge behavior inside the tox/lsr pipeline to avoid silently dropping dependencies.
- The `git+https://github.com/linux-system-roles/tox-lsr@3.18.0` reference is duplicated across several workflows; consider centralizing this (e.g., via a reusable workflow or shared action) so future version bumps only need to be made in one place.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
Update CI workflows to align ansible-lint and ansible-test checks with Ansible partner certification requirements.
CI: