Skip to content
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 15 commits into from
Apr 20, 2023
149 changes: 149 additions & 0 deletions .github/workflows/tests.yml
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
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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?

Copy link
Contributor Author

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.

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'}"
3 changes: 3 additions & 0 deletions changelogs/fragments/add_github_actions_unitandsanity.yml
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).