Skip to content

Commit

Permalink
Add sanity, linters, changelog and units workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed May 2, 2023
1 parent 2c4575c commit 3376925
Show file tree
Hide file tree
Showing 7 changed files with 263 additions and 50 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/all_green_ckeck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: all_green

concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize
branches:
- main
- 'stable-*'
tags:
- '*'

jobs:
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'}"
17 changes: 17 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: black

concurrency:
group: '${{ github.workflow }} @ ${{ github.sha }}'
cancel-in-progress: true

on:
push:
branches:
- main
- 'stable-*'
pull_request_target:

jobs:
format:
uses: abikouo/github_actions/.github/workflows/black.yml@automate_changes_a
23 changes: 23 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: changelog
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize
branches:
- main
- 'stable-*'
tags:
- '*'

jobs:
changelog:
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
50 changes: 0 additions & 50 deletions .github/workflows/darker-pr.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: linters

concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize
branches:
- main
- 'stable-*'
tags:
- '*'

jobs:
linters:
uses: abikouo/github_actions/.github/workflows/tox-linters.yml@tox_linters
80 changes: 80 additions & 0 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: sanity tests

concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize
branches:
- main
- 'stable-*'
tags:
- '*'

jobs:
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"
}
]
80 changes: 80 additions & 0 deletions .github/workflows/units.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: unit tests

concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize
branches:
- main
- 'stable-*'
tags:
- '*'

jobs:
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: ''

0 comments on commit 3376925

Please sign in to comment.