This repository provides Red Hat partners with GitHub workflows that check collections for minimum requirements for certification on Red Hat Ansible Automation Hub (Automation Hub).
To upload Ansible collections to Automation Hub, Red Hat partners must satisfy certification requirements. Those requirements include running sanity and lint tests against collections during the Automation Hub import process.
In cases where those tests fail or highlight breaking issues, the collection uploads are rejected. This requires Red Hat partners to address the issues and resubmit their collections, which results in additional development and release cycles.
The certification checker provides Red Hat partners with the ability to assess the readiness of collections for certification. It is a minimal tool intended to reduce the likelihood of rejection by identifying common errors that Red Hat partners can fix before uploading to Automation Hub.
Certification checks are not a substitute for a comprehensive testing strategy. You should add unit and integration tests for robust test coverage that validates the functionality and behavior of your modules, plugins, and roles.
To run the certification checks against pull requests and on schedule:
- Copy the Ansible collection certification GitHub Actions workflow to the
.github/workflowsdirectory of your collection repository, for example:git clone git@github.com:ansible-collections/partner-certification-checker.git cp partner-certification-checker/.github/workflows/certification.yml path/to/repository/.github/workflows/
- Add an .ansible-lint configuration file to the root directory of your collection.
- List any files and folders that are not related to the collection's core functionality, such as
.github/, to theexclude_pathsoption. This prevents Ansible Lint rule violations in those files and folders. - Commit and push the changes to your repository.
- Navigate to the
Actionstab of your repository and verify that the workflow is enabled. - (Optional but recommended) Add a .github/dependabot.yml configuration file to your repository. When a new version of the certification workflow is released, Dependabot automatically opens a pull request to update your repository. For more information about Dependabot, see the official documentation.
The certification checker might report sanity test failures that cannot be fixed and should be ignored. In this case you should do the following:
- Review the list of currently allowed ignores.
- Create a sanity ignore file for each affected version of ansible-core (for example,
tests/sanity/ignore-2.18.txt). - Add the corresponding entries to the sanity ignore files.
- Commit and push the changes to your repository.
The .github/workflows/certification.yml workflow file calls a reusable workflow that the Ansible Community and Partner Engineering team at Red Hat maintain.
If you want to modify and maintain the certification checker, you can use the .github/workflows/certification-static.yml workflow file instead.
You must update the list of ansible-core versions in the sanity.strategy.matrix.ansible section of the workflow when new versions of ansible-core are released.
Refer to default ansible-core versions in the Ansible Automation Platform Installation Requirements section of the Red Hat Ansible Automation Platform Life Cycle document.
- Contributing - How to contribute to this project
- Code of Conduct - Ansible Community Code of Conduct
- Security Policy - How to report security vulnerabilities
- License - GPL-3.0