forked from ansible-collections/community.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github action for sanity and unit tests (ansible-collections#1393)
SUMMARY Add github action workflow. ISSUE TYPE Feature Pull Request
- Loading branch information
1 parent
736754b
commit 68a36b2
Showing
2 changed files
with
152 additions
and
0 deletions.
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: >- | ||
[ | ||
{ | ||
"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). |