ci: add Ansible partner certification check [citest_skip]#333
ci: add Ansible partner certification check [citest_skip]#333richm merged 1 commit intolinux-system-roles:mainfrom
Conversation
See https://github.com/ansible-collections/partner-certification-checker/blob/main/README.md Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Reviewer's GuideAdds a new GitHub Actions workflow to run the Ansible partner certification checks against the collection converted from this role, with CI skip logic gated on a [citest_skip] marker in PR titles and commit messages. Sequence diagram for CI skip logic and certification workflow invocationsequenceDiagram
actor Developer
participant GitHub
participant Workflow as Workflow_Run_collection_cert_checks
participant Prep_job
participant Call_job
participant Reusable as Certification_reusable_workflow
Developer->>GitHub: Push_commit_or_open_PR
GitHub->>Workflow: Trigger_on_PR_push_or_dispatch
Workflow->>Workflow: Evaluate_if_expression
alt Title_or_commit_contains_citest_skip
Workflow-->>Prep_job: Skip_job_prep
Workflow-->>Call_job: Skip_job_call
else No_citest_skip_marker
Workflow->>Prep_job: Start_job_prep
Prep_job->>Prep_job: Update_pip_and_git
Prep_job->>Prep_job: Checkout_repository
Prep_job->>Prep_job: Install_tox_lsr
Prep_job->>Prep_job: Convert_role_to_collection
Prep_job-->>Workflow: Job_prep_success
Workflow->>Call_job: Start_job_call_needs_prep
Call_job->>Reusable: Invoke_certification_reusable_workflow
Reusable-->>Call_job: Run_partner_cert_checks
Call_job-->>Workflow: Report_cert_results
end
Workflow-->>GitHub: Report_overall_CI_status
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:
- The
ifcondition used to skip when[citest_skip]is present is duplicated across theprepandcalljobs; consider extracting this into a reusable expression via a job-level output or using a single gate job to avoid having to maintain the same logic in multiple places. - Installing
gitviasudo apt install -y gitonubuntu-latestis likely unnecessary because the runner already includes git; you can remove this step to simplify and slightly speed up the workflow.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `if` condition used to skip when `[citest_skip]` is present is duplicated across the `prep` and `call` jobs; consider extracting this into a reusable expression via a job-level output or using a single gate job to avoid having to maintain the same logic in multiple places.
- Installing `git` via `sudo apt install -y git` on `ubuntu-latest` is likely unnecessary because the runner already includes git; you can remove this step to simplify and slightly speed up the workflow.
## Individual Comments
### Comment 1
<location path=".github/workflows/ansible-cert-check.yml" line_range="53-54" />
<code_context>
+ sudo apt update
+ sudo apt install -y git
+
+ - name: Checkout repo
+ uses: actions/checkout@v6
+
+ - name: Install tox, tox-lsr
</code_context>
<issue_to_address>
**issue (bug_risk):** The `actions/checkout@v6` reference may not exist yet and can break the workflow when it runs.
Unless you’ve confirmed that `actions/checkout@v6` actually exists in the GitHub Marketplace, please switch to the latest known stable major (e.g., `actions/checkout@v4`) or pin a specific SHA/tag. That will avoid workflow failures and keep this consistent with the pinning strategy used in the reusable workflow.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - name: Checkout repo | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
issue (bug_risk): The actions/checkout@v6 reference may not exist yet and can break the workflow when it runs.
Unless you’ve confirmed that actions/checkout@v6 actually exists in the GitHub Marketplace, please switch to the latest known stable major (e.g., actions/checkout@v4) or pin a specific SHA/tag. That will avoid workflow failures and keep this consistent with the pinning strategy used in the reusable workflow.
See https://github.com/ansible-collections/partner-certification-checker/blob/main/README.md
Signed-off-by: Rich Megginson rmeggins@redhat.com
Summary by Sourcery
CI: