ci: Comply with Ansible partner certification checking [citest_skip]#608
ci: Comply with Ansible partner certification checking [citest_skip]#608
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 GuideUpdates CI workflows to align with Ansible partner certification expectations by running ansible-lint and ansible-test across multiple Ansible/Python versions via tox-lsr, and standardizes on using the latest tox-lsr from main instead of a pinned version. Flow diagram for updated ansible-lint GitHub Actions jobflowchart TD
A["Start_ansible-lint_job"] --> B["Evaluate_citest_skip_condition"]
B -->|Not_skipped| C["Create_matrix_over_versions"]
B -->|Skipped| Z["End_job"]
C --> D["Checkout_repository"]
D --> E["Update_pip_and_git"]
E --> F["Install_tox_and_tox-lsr_from_main"]
F --> G["Set_up_Python_using_actions_setup-python_with_matrix_python"]
G --> H["Run_tox_with_env_overrides"]
subgraph ToxExecution["tox_execution"]
H1["Set_LSR_ANSIBLE_LINT_DEP_from_matrix_ansible-lint"]
H2["Set_LSR_ANSIBLE_LINT_ANSIBLE_DEP_from_matrix_ansible"]
H3["Run_tox_with_testenv_ansible-lint-collection.basepython_set_to_matrix_python"]
H4["Execute_env_collection_and_ansible-lint-collection"]
end
H --> H1 --> H2 --> H3 --> H4 --> I["ansible-lint_runs_against_collection"]
I --> Z
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 found 1 issue, and left some high level feedback:
- Installing tox-lsr from the main branch (
git+https://github.com/linux-system-roles/tox-lsr@main) makes CI behavior dependent on unreleased upstream changes; consider pinning to a tagged version or commit SHA to keep the workflows reproducible.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Installing tox-lsr from the main branch (`git+https://github.com/linux-system-roles/tox-lsr@main`) makes CI behavior dependent on unreleased upstream changes; consider pinning to a tagged version or commit SHA to keep the workflows reproducible.
## Individual Comments
### Comment 1
<location path=".github/workflows/ansible-lint.yml" line_range="33" />
<code_context>
+ # https://github.com/ansible-collections/partner-certification-checker/blob/main/.github/workflows/certification-reusable.yml#L108
+ versions:
+ - { ansible-lint: "24.*", ansible: "2.16.*", python: "3.12" }
+ - { ansible-lint: "26.*", ansible: "2.20.*", python: "3.14" }
steps:
- name: Update pip, git
</code_context>
<issue_to_address>
**issue (bug_risk):** Using Python 3.14 in the matrix may break the workflow until that version is actually supported by setup-python and the toolchain
`actions/setup-python` and the current Python ecosystem don’t yet support 3.14, so this job will fail once it runs (`Version 3.14 not found`). Consider either gating this entry with a condition, using the latest stable (e.g. 3.12/3.13) for now, or commenting it out until 3.14 is officially supported by `actions/setup-python` and the ansible/ansible-lint versions you depend on.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| # https://github.com/ansible-collections/partner-certification-checker/blob/main/.github/workflows/certification-reusable.yml#L108 | ||
| versions: | ||
| - { ansible-lint: "24.*", ansible: "2.16.*", python: "3.12" } | ||
| - { ansible-lint: "26.*", ansible: "2.20.*", python: "3.14" } |
There was a problem hiding this comment.
issue (bug_risk): Using Python 3.14 in the matrix may break the workflow until that version is actually supported by setup-python and the toolchain
actions/setup-python and the current Python ecosystem don’t yet support 3.14, so this job will fail once it runs (Version 3.14 not found). Consider either gating this entry with a condition, using the latest stable (e.g. 3.12/3.13) for now, or commenting it out until 3.14 is officially supported by actions/setup-python and the ansible/ansible-lint versions you depend on.
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 test checks with partner certification requirements and broader version coverage.
CI: