Skip to content

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

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]#234
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 rmeggins@redhat.com

Summary by Sourcery

Update CI workflows to run Ansible lint and test checks across multiple supported Ansible and Python versions to align with partner certification requirements.

CI:

  • Run ansible-lint in CI via tox against multiple ansible-lint and ansible-core versions using a GitHub Actions matrix.
  • Run ansible-test in CI via tox across a matrix of supported ansible-core and Python versions, including milestone releases.
  • Upgrade all GitHub workflows to use tox-lsr 3.18.0 for linting, testing, and integration jobs.

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>
@richm richm requested a review from Jakuje as a code owner April 8, 2026 22:00
@richm richm self-assigned this Apr 8, 2026
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 8, 2026

Reviewer's Guide

CI workflows are updated to use tox-lsr 3.18.0 and to run ansible-lint and ansible-test via tox matrices covering multiple Ansible and Python versions in alignment with Ansible partner certification requirements, replacing direct GitHub Actions integrations and manual collection-handling logic.

Flow diagram for ansible-lint CI job with tox matrix

flowchart TD
  S[Start ansible_lint_job] --> C[Checkout code]
  C --> U[Update pip and git]
  U --> I[pip install tox and tox_lsr_3_18_0]
  I --> M{Matrix version}

  M -->|version_set_1\nansible_lint_24.x\nansible_core_2.16.x\npython_3.12| P1[actions_setup_python python_3_12]
  M -->|version_set_2\nansible_lint_26.x\nansible_core_2.20.x\npython_3.13| P2[actions_setup_python python_3_13]

  P1 --> E1[set LSR_ANSIBLE_LINT_DEP and LSR_ANSIBLE_LINT_ANSIBLE_DEP]
  P2 --> E2[set LSR_ANSIBLE_LINT_DEP and LSR_ANSIBLE_LINT_ANSIBLE_DEP]

  E1 --> T1[tox -e collection,ansible-lint-collection\nbasepython python3_12]
  E2 --> T2[tox -e collection,ansible-lint-collection\nbasepython python3_13]

  T1 --> R1[Run ansible-lint inside collection env]
  T2 --> R2[Run ansible-lint inside collection env]

  R1 --> F[Job complete]
  R2 --> F
Loading

File-Level Changes

Change Details Files
Expand ansible-lint workflow to run via tox against a matrix of ansible-lint, ansible-core, and Python versions instead of a single GitHub Action invocation with custom collection requirements merging.
  • Add a strategy matrix with multiple ansible-lint, ansible-core, and Python version combinations and disable fail-fast so all variants run.
  • Upgrade tox-lsr dependency from version 3.17.1 to 3.18.0 in the workflow environment setup.
  • Introduce actions/setup-python to select the matrix Python version before running checks.
  • Replace the separate collection-conversion and ansible-lint GitHub Action steps with a single shell step that sets LSR_ANSIBLE_LINT_* env vars and invokes tox for the collection and ansible-lint-collection environments, including overriding basepython for the lint env.
.github/workflows/ansible-lint.yml
Broaden ansible-test coverage by running ansible-test via tox across a matrix of Ansible core and Python versions, removing reliance on the ansible-test GitHub Action.
  • Add a strategy matrix covering multiple ansible-test targets (including milestone) and associated Python versions, with fail-fast disabled.
  • Upgrade tox-lsr dependency from version 3.17.1 to 3.18.0 in the workflow.
  • Introduce actions/setup-python to configure the matrix Python version.
  • Replace the previous ansible-test GitHub Action step and standalone collection-conversion step with a tox call that runs both collection conversion and the appropriate ansible-test-* environment, overriding basepython according to the matrix.
.github/workflows/ansible-test.yml
Align remaining CI workflows with tox-lsr 3.18.0 to support the new partner certification style tox environments.
  • 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 qemu-kvm-integration-tests workflow.
.github/workflows/ansible-managed-var-comment.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 4eada7b into main Apr 8, 2026
30 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