-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add github action for sanity and unit tests #1393
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5cf4efc
Add github action for sanity and unit tests
GomathiselviS 4660b8c
Skip ansible-2.9 for sanity
GomathiselviS b6c3399
Update .github/workflows/tests.yml
GomathiselviS f5d76c0
Remove unit-galaxy
GomathiselviS 45edf65
add matrix_include
GomathiselviS c79a322
Skipping py 3.11 for unit tests
GomathiselviS 1af196d
remove matrix_include
GomathiselviS 1c507e2
remove matrix_include
GomathiselviS 990709f
Add changelog
GomathiselviS 253d5fe
Fix ansible-lint errors
GomathiselviS 12d6ef6
Fix sanity issues
GomathiselviS d085d00
Add ansible-lint exclude_paths
GomathiselviS a2cabad
Remove ansible-lint
GomathiselviS f624b3d
Sanity fix
GomathiselviS 745464f
Fix all_green
GomathiselviS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
--- | ||
name: Test collection | ||
|
||
concurrency: | ||
group: ${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linters: | ||
uses: abikouo/github_actions/.github/workflows/tox-linters.yml@tox_linters | ||
changelog: | ||
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main | ||
sanity: | ||
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main | ||
with: | ||
matrix_include: "[]" | ||
matrix_exclude: >- | ||
GomathiselviS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[ | ||
{ | ||
"ansible-version": "stable-2.9" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.12", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.12", | ||
"python-version": "3.11" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.13", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.13", | ||
"python-version": "3.11" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.14", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.14", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.15", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.15", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "milestone", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "milestone", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "devel", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "devel", | ||
"python-version": "3.8" | ||
} | ||
] | ||
unit-source: | ||
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main | ||
with: | ||
matrix_exclude: >- | ||
[ | ||
{ | ||
"python-version": "3.11" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.12", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.13", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.12", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.13", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.14", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.14", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.15", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "stable-2.15", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "milestone", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "milestone", | ||
"python-version": "3.8" | ||
}, | ||
{ | ||
"ansible-version": "devel", | ||
"python-version": "3.7" | ||
}, | ||
{ | ||
"ansible-version": "devel", | ||
"python-version": "3.8" | ||
} | ||
] | ||
collection_pre_install: '' | ||
all_green: | ||
if: ${{ always() }} | ||
needs: | ||
- changelog | ||
- linters | ||
- sanity | ||
- unit-source | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: >- | ||
python -c "assert set([ | ||
'${{ needs.changelog.result }}', | ||
'${{ needs.sanity.result }}', | ||
'${{ needs.linters.result }}', | ||
'${{ needs.unit-source.result }}' | ||
]) == {'success'}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
minor_changes: | ||
- Add github actions to run unit and sanity tests.(https://github.com/ansible-collections/amazon.aws/pull/1393). |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My preference would be to hold off on merging until we get these changes merged into the ansible-network repo, as I'd like to avoid calling out to personal repos. I won't block on this if people feel strongly that this is worth merging now, but ultimately, I want our CI burden to be shared more broadly than it has been in the past. Otherwise, I think everything looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jillr suggested that we can go ahead with the merge and not wait until the migration of ansible-network/github_actions repo. PRs on other cloud collections have been merged, which use the workflows from personal repo. @jillr , What do you think about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I thought we were talking about merging things into the repo in the ansible-network org, without waiting for that repo to be migrated to the ansible-community org. Is that not the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are calls to @abikouo's repos which we will update in a separate PR, post the migration of github-actions repo.