ci: Comply with Ansible partner certification checking [citest_skip]#252
Merged
ci: Comply with Ansible partner certification checking [citest_skip]#252
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 GuideAlign CI with Ansible partner certification expectations by running ansible-lint and ansible-test via tox-lsr across multiple Ansible/Python versions and updating tox-lsr to 3.18.0 in all workflows, replacing the previous GitHub Actions-based lint/test invocations and custom collection-conversion logic. Sequence diagram for updated ansible-lint CI workflowsequenceDiagram
actor Developer
participant GitHub as GitHub
participant Workflow_ansible_lint as Workflow_ansible_lint
participant Matrix as Matrix_versions
participant Tox as tox_lsr
participant AnsibleLint as ansible_lint
Developer->>GitHub: push_or_pull_request
GitHub->>Workflow_ansible_lint: trigger_if_not_citest_skip
Workflow_ansible_lint->>Matrix: expand_versions_matrix
loop for_each_matrix_entry
Matrix->>Workflow_ansible_lint: provide_ansible_lint_ansible_python_versions
Workflow_ansible_lint->>Workflow_ansible_lint: update_pip_and_git
Workflow_ansible_lint->>Workflow_ansible_lint: install_tox_lsr_3_18_0
Workflow_ansible_lint->>Workflow_ansible_lint: setup_python_for_matrix_version
Workflow_ansible_lint->>Tox: run_collection_and_ansible_lint_environments
Tox->>AnsibleLint: execute_ansible_lint_with_specified_versions
AnsibleLint-->>Tox: lint_results
Tox-->>Workflow_ansible_lint: job_status
end
Workflow_ansible_lint-->>GitHub: report_combined_matrix_status
GitHub-->>Developer: ci_status_on_commit_or_pr
Flow diagram for multi-version ansible-lint job executionflowchart TD
TRIG["CI trigger (push or pull_request without [citest_skip])"] --> JOB["Start ansible_lint job"]
JOB --> STRAT["Define strategy matrix with ansible_lint, ansible_core, python versions"]
STRAT --> LOOP["For each matrix entry"]
LOOP --> SETUP_PY["Set up Python for matrix python version"]
SETUP_PY --> INST_ToxLSR["Install tox_lsr 3.18.0 via pip"]
INST_ToxLSR --> SET_ENV["Set LSR_ANSIBLE_LINT_DEP and LSR_ANSIBLE_LINT_ANSIBLE_DEP from matrix"]
SET_ENV --> RUN_TOX["Run tox with environments collection and ansible_lint_collection
(testenv:ansible_lint_collection.basepython set to matrix python)"]
RUN_TOX --> LINT_RES["ansible_lint results for this version set"]
LINT_RES --> DECIDE{More matrix entries?}
DECIDE -->|Yes| LOOP
DECIDE -->|No| REPORT["Report combined status back to GitHub"]
REPORT --> END["ansible_lint job completed"]
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 tox-lsr version pin is duplicated across multiple workflows; consider centralizing this (e.g., via a reusable workflow, composite action, or shared workflow variable) 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 tox-lsr version pin is duplicated across multiple workflows; consider centralizing this (e.g., via a reusable workflow, composite action, or shared workflow variable) 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 by testing multiple supported versions via tox-lsr.
CI: