Adding test to ensure that any added role gets a README file#169
Open
jwlodek wants to merge 2 commits intoNSLS2:mainfrom
Open
Adding test to ensure that any added role gets a README file#169jwlodek wants to merge 2 commits intoNSLS2:mainfrom
jwlodek wants to merge 2 commits intoNSLS2:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new test to ensure that every device role has a README.md file, modernizes the test_device_roles.py file to use pathlib instead of os, and adds configuration updates to exclude the collections/ansible_collections/ directory from various linters and formatters. A new GitHub Actions workflow is also introduced to validate configurations.
Changes:
- Added test to verify each device role has a README.md file
- Modernized test_device_roles.py to use pathlib instead of os module
- Added collections/ansible_collections/ exclusions to ruff.toml, .pre-commit-config.yaml, and .ansible-lint
- Created new GitHub Actions workflow for validating module vars, device roles, and example configs
- Added testpaths configuration to pytest.ini and indent-width to ruff.toml
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_device_roles.py | Modernized to use pathlib, renamed parameters to device_role_name, and added test for README.md existence |
| ruff.toml | Added exclusion for collections/ansible_collections/ and indent-width configuration |
| pytest.ini | Added testpaths configuration to specify tests directory |
| .pre-commit-config.yaml | Added global exclusion pattern for collections/ansible_collections/ |
| .ansible-lint | Added collections/ansible_collections/ to exclude_paths |
| .github/workflows/validate_configs.yml | New workflow file with three sequential jobs for validating different configuration types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.