Skip to content

ci: Comply with Ansible partner certification checking [citest_skip]#612

Merged
richm merged 1 commit intomainfrom
ci-ansible-lint-ansible-test-matrix
Apr 8, 2026
Merged

ci: Comply with Ansible partner certification checking [citest_skip]#612
richm merged 1 commit intomainfrom
ci-ansible-lint-ansible-test-matrix

Conversation

@richm
Copy link
Copy Markdown
Contributor

@richm richm commented Apr 8, 2026

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]

Summary by Sourcery

Update Ansible CI workflows to align with partner certification requirements by running linting and testing across multiple supported Ansible and Python versions via tox-lsr.

Enhancements:

  • Run ansible-lint in collection format via tox with matrixed ansible-lint, ansible-core, and Python versions instead of the ansible-lint GitHub Action.
  • Run ansible-test sanity checks through tox against a matrix of ansible-core and Python versions, including milestone releases.

Build:

  • Bump tox-lsr dependency to version 3.18.0 across CI workflows.

CI:

  • Introduce matrix strategies in ansible-lint and ansible-test workflows to cover Automation Hub gating, supported EL versions, and latest/milestone Ansible releases.
  • Replace direct GitHub Action invocations and ad-hoc collection-requirements handling with tox-based collection conversion and test execution.

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]>
@richm richm self-assigned this Apr 8, 2026
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 8, 2026

Reviewer's Guide

Updates GitHub Actions CI to align with Ansible partner certification requirements by running ansible-lint and ansible-test via tox-lsr across multiple Ansible/Python versions and bumping tox-lsr to 3.18.0 throughout workflows.

Flow diagram for updated ansible-lint CI job with matrix and tox-lsr

flowchart TD
  trigger["PR or push event (without [citest_skip])"] --> job_start["Start ansible-lint job"]

  job_start --> define_matrix["Define matrix of ansible-lint, ansible-core, python versions"]
  define_matrix --> update_tools["Update pip and git"]
  update_tools --> install_tox_lsr["pip install tox-lsr 3.18.0 from Git"]
  install_tox_lsr --> setup_python["actions/setup-python with matrix python-version"]

  setup_python --> run_tox["Run tox with envs collection and ansible-lint-collection"]

  run_tox --> set_env_deps["Set LSR_ANSIBLE_LINT_DEP and LSR_ANSIBLE_LINT_ANSIBLE_DEP for matrix"]
  set_env_deps --> tox_collection["tox env collection (convert role to collection)"]
  tox_collection --> tox_ansible_lint_collection["tox env ansible-lint-collection (run ansible-lint)"]
  tox_ansible_lint_collection --> job_result["Report ansible-lint results for this matrix entry"]

  job_result --> matrix_aggregate["Aggregate results across matrix entries"]
  matrix_aggregate --> workflow_status["Set overall workflow status"]
Loading

File-Level Changes

Change Details Files
Run ansible-lint via tox-lsr across multiple Ansible, ansible-lint, and Python versions instead of using the ansible-lint GitHub Action on a single environment.
  • Add a non-fail-fast matrix strategy over ansible-lint, ansible-core, and Python versions in the ansible-lint workflow job.
  • Upgrade tox-lsr to version 3.18.0 in the ansible-lint workflow.
  • Replace the bespoke collection-conversion plus ansible-lint action step with a tox invocation that converts the role to a collection and runs ansible-lint using LSR_ANSIBLE_LINT_DEP and LSR_ANSIBLE_LINT_ANSIBLE_DEP to pin versions, including per-matrix basepython overrides.
.github/workflows/ansible-lint.yml
Run ansible-test via tox-lsr across multiple Ansible and Python versions instead of using the ansible-test GitHub Action with a single Ansible version.
  • Add a non-fail-fast matrix strategy over ansible-core and Python versions in the ansible-test workflow job, including milestone coverage.
  • Upgrade tox-lsr to version 3.18.0 in the ansible-test workflow.
  • Replace the previous ansible-test GitHub Action usage with a tox command that converts to a collection and runs ansible-test-${version} envs with per-matrix basepython overrides.
.github/workflows/ansible-test.yml
Align remaining workflows with tox-lsr 3.18.0.
  • Bump tox-lsr version from 3.17.1 to 3.18.0 in the ansible-managed-var-comment workflow.
  • Bump tox-lsr version from 3.17.1 to 3.18.0 in the python-unit-test workflow.
  • Bump tox-lsr version from 3.17.1 to 3.18.0 in the qemu-kvm-integration-tests workflow.
.github/workflows/ansible-managed-var-comment.yml
.github/workflows/python-unit-test.yml
.github/workflows/qemu-kvm-integration-tests.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@richm richm merged commit 4799f12 into main Apr 8, 2026
14 checks passed
@richm richm deleted the ci-ansible-lint-ansible-test-matrix branch April 8, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant