ansible-community/ansible-test
GitHub Action for checking Ansible Collections with ansible-test
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 6, 2026
- License
- GPL 3.0
Pinned Snippet
uses: ansible-community/ansible-test-gh-action@6ded727edb598e670ac056a8e680ca4050bac0a3 # v1.18.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| ansible-core-version | `ansible-core` Git revision. See https://github.com/ansible/ansible/tags and https://github.com/ansible/ansible/branches/all?query=stable- for ideas. The repository this refers to can be changed with the `ansible-core-github-repository-slug` option. | yes | stable-2.21 |
| ansible-core-github-repository-slug | The GitHub repository slug from which to check out ansible-core | — | ansible/ansible |
| codecov-token | The Codecov token to use when uploading coverage data. | — | — |
| controller-python-version | Controller Python version. Only used for integration tests and ansible-core 2.12 or later when `target-python-version` is also specified. | — | auto |
| collection-root | Collection root relative to repository root | — | . |
| collection-src-directory | A pre-checked out collection directory that's already on disk, substitutes getting the source from the remote Git repository if set. This action will not attempt to mutate its contents | — | — |
| coverage | Whether to collect and upload coverage information. Can be set to `always`, `never`, and `auto`. The value `auto` will upload coverage information except when `pull-request-change-detection` is set to `true` and the action is called from a Pull Request. | — | auto |
| docker-image | Docker image used by ansible-test | — | — |
| git-checkout-ref | Committish to check out, unused if `collection-src-directory` is set | — | — |
| integration-continue-on-error | Whether the continue with the other integration tests when an error occurs. If set to `false`, will stop on the first error. When set to `false` and `coverage=auto`, code coverage uploading will be disabled. | — | true |
| integration-diff | Whether to show diff output when calling actions in integration tests. Actions can override this by specifying `diff: false` or `diff: true`. | — | true |
| integration-retry-on-error | Whether to retry the current integration test once when an error happens. | — | true |
| origin-python-version | Environment Python version. The value `auto` uses the maximum Python version supported by the given `ansible-core-version`. | — | auto |
| pre-test-cmd | Extra command to invoke before ansible-test | — | — |
| pull-request-change-detection | Whether to use change detection for pull requests. If set to `true`, will use change detection to determine changed files against the target branch, and will not upload code coverage results. If the invocation is not from a pull request, this option is ignored. Note that this requires `collection-src-directory` to be empty, or it has to be a git repository checkout where `collection-src-directory`/`collection-root` ends with `ansible_collections/{namespace}/{name}`, or it has to be a git repository checkout where `collection-root` is `.`. | — | false |
| python-version | **(DEPRECATED)** Use `origin-python-version` instead. This is only kept for backwards compatibility. | — | — |
| sanity-tests | Comma-separated list of sanity tests to run. If not present, all applicable tests are run. | — | — |
| sanity-skip-tests | Comma-separated list of sanity tests to skip. | — | — |
| sanity-allow-disabled | Allow sanity tests to run which are disabled by default. | — | false |
| target | ansible-test TARGET | — | — |
| target-python-version | Target Python version | — | — |
| testing-type | One of 'sanity', 'units' or 'integration' | yes | — |
| test-deps | Test dependencies to install along with this collection | — | — |
Outputs
| name | description |
|---|---|
| ansible-playbook-executable | Path to the auto-installed `ansible-playbook` executable |
| ansible-test-executable | Path to the auto-installed `ansible-test` executable |
| checkout-directory | Path to the auto-downloaded collection src directory |
| collection-fqcn | Detected collection FQCN |
| collection-name | Detected collection name |
| collection-namespace | Detected collection namespace |
| coverage-report-files | A comma-separated list of produced Cobertura XML coverage report file paths |
| origin-python-path | The [`python-path` output value](https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#python-path) of the [setup-python](https://github.com/actions/setup-python/#readme) action. |
| origin-python-version | The actual value of `origin-python-version` passed to the [setup-python](https://github.com/actions/setup-python/#readme) action. |
| test-result-files | A comma-separated list of produced JUnit XML test result file paths |