ci: ansible-lint requires dependencies to be installed [citest_skip]#231
Merged
ci: ansible-lint requires dependencies to be installed [citest_skip]#231
Conversation
ansible-lint requires the dependencies in meta/collection-requirements.yml and tests/collection-requirements.yml to be installed. tox-lsr 3.18.1 will ensure they are installed. Refactor the tests somewhat so that the collection and test steps are separate. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates GitHub Actions workflows to use tox-lsr 3.18.1 and decouples collection conversion from ansible-lint/ansible-test runs so that required collection dependencies are installed via tox-lsr before tests and linting execute. Sequence diagram for decoupled collection conversion and ansible-lint runsequenceDiagram
participant GHA as GitHub_Actions
participant Job as ansible_lint_job
participant Pip as pip3
participant ToxLSR as tox_lsr_3_18_1
participant ToxCol as tox_env_collection
participant ToxLint as tox_env_ansible_lint_collection
participant AnsibleCore as ansible_core
participant AnsibleLint as ansible_lint
GHA->>Job: start_matrix_job
Job->>Pip: install tox_lsr_3_18_1
Pip-->>Job: tox_lsr_3_18_1_available
Job->>ToxLSR: tox -e collection
ToxLSR->>ToxCol: run_collection_env
ToxCol->>ToxCol: install_collection_dependencies
ToxCol-->>ToxLSR: collection_ready
Job->>ToxLSR: tox -e ansible-lint-collection
ToxLSR->>ToxLint: run_ansible_lint_collection_env
ToxLint->>AnsibleCore: load_ansible_core_version
ToxLint->>AnsibleLint: run_ansible_lint_with_collection
AnsibleLint-->>ToxLint: lint_results
ToxLint-->>Job: exit_status
Job-->>GHA: job_status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ansible-lint requires the dependencies in meta/collection-requirements.yml
and tests/collection-requirements.yml to be installed. tox-lsr 3.18.1
will ensure they are installed.
Refactor the tests somewhat so that the collection and test steps are separate.
Signed-off-by: Rich Megginson rmeggins@redhat.com
Summary by Sourcery
Update CI workflows to use tox-lsr 3.18.1 and separate collection conversion from lint/test execution.
CI: