ci: Comply with Ansible partner certification checking [citest_skip]#304
Merged
ci: Comply with Ansible partner certification checking [citest_skip]#304
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 GitHub Actions CI workflows to use tox-lsr 3.18.0 and to run Ansible lint and test checks via tox across multiple Ansible/ansible-lint/Python versions that match partner certification expectations, replacing direct GitHub Actions integrations with matrix-driven tox invocations. Sequence diagram for updated ansible-lint job using tox matrixsequenceDiagram
actor Developer
participant GitHub as GitHub_Actions
participant Job as Job_ansible-lint
participant Matrix as Strategy_Matrix
participant SetupPy as Setup_Python
participant Pip as Pip_Install
participant Tox as Tox_With_tox-lsr
Developer->>GitHub: push_or_pull_request
GitHub->>Job: trigger_ansible-lint_workflow
Job->>Matrix: expand_versions_matrix
Matrix-->>Job: version_entries
loop for_each_matrix_entry
Job->>Pip: pip_install_tox-lsr_3_18_0
Pip-->>Job: tox-lsr_3_18_0_available
Job->>SetupPy: setup_python(matrix.python)
SetupPy-->>Job: python_runtime_ready
Job->>Tox: run_tox_envs(collection, ansible-lint-collection)
Tox->>Tox: set_env_LSR_ANSIBLE_LINT_DEP
Tox->>Tox: set_env_LSR_ANSIBLE_LINT_ANSIBLE_DEP
Tox-->>Job: ansible-lint_results_for_version
end
Job-->>GitHub: report_matrix_status
GitHub-->>Developer: checks_pass_or_fail
Flow diagram for ansible-lint matrix job executionflowchart TD
A["Workflow_triggered(push_or_pull_request)"] --> B["Evaluate_[citest_skip]_condition"]
B -->|skip| Z["Exit_without_running_job"]
B -->|run| C["Initialize_job_ansible-lint"]
C --> D["Create_matrix_with_two_version_sets"]
D --> E["For_each_matrix_entry"]
E --> F["Install_tox-lsr_3_18_0_with_pip"]
F --> G["Setup_Python_from_matrix.python"]
G --> H["Set_env_LSR_ANSIBLE_LINT_DEP_and_LSR_ANSIBLE_LINT_ANSIBLE_DEP"]
H --> I["Run_tox_with_envs_collection_and_ansible-lint-collection"]
I --> J["Collect_results_for_matrix_entry"]
J --> K{More_matrix_entries?}
K -->|yes| E
K -->|no| L["Aggregate_matrix_results"]
L --> M["Report_status_to_GitHub_checks"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 with Ansible partner certification requirements by running ansible-lint and ansible-test via tox across multiple supported Ansible and Python versions.
CI: