Skip to content

Commit

Permalink
Merge pull request #122 from GomathiselviS/divide_workflows
Browse files Browse the repository at this point in the history
Divide github workflows to maintain consistency across all cloud repos
  • Loading branch information
GomathiselviS authored Oct 25, 2023
2 parents 45c5fd3 + e46da82 commit e237f63
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 179 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/all_green_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: all_green

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

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

jobs:
linters:
uses: ./.github/workflows/linters.yml # use the callable linters job to run tests
sanity:
uses: ./.github/workflows/sanity.yml # use the callable sanity job to run tests
units:
uses: ./.github/workflows/units.yml # use the callable units job to run tests
all_green:
if: ${{ always() }}
needs:
- linters
- sanity
- units
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
'${{ needs.linters.result }}',
'${{ needs.sanity.result }}',
'${{ needs.units.result }}'
]) == {'success'}"
7 changes: 7 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: linters

on: [workflow_call] # allow this workflow to be called from other workflows

jobs:
linters:
uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main
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

on: [workflow_call] # allow this workflow to be called from other workflows

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.14",
"python-version": "3.11"
},
{
"ansible-version": "stable-2.15",
"python-version": "3.7"
},
{
"ansible-version": "stable-2.15",
"python-version": "3.8"
},
{
"ansible-version": "stable-2.15",
"python-version": "3.11"
},
{
"ansible-version": "milestone",
"python-version": "3.7"
},
{
"ansible-version": "milestone",
"python-version": "3.8"
},
{
"ansible-version": "milestone",
"python-version": "3.9"
},
{
"ansible-version": "devel",
"python-version": "3.7"
},
{
"ansible-version": "devel",
"python-version": "3.8"
},
{
"ansible-version": "devel",
"python-version": "3.9"
}
]
179 changes: 0 additions & 179 deletions .github/workflows/unit_and_sanity.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/units.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: unit tests

on: [workflow_call] # allow this workflow to be called from other workflows

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": "milestone",
"python-version": "3.9"
},
{
"ansible-version": "devel",
"python-version": "3.7"
},
{
"ansible-version": "devel",
"python-version": "3.8"
},
{
"ansible-version": "devel",
"python-version": "3.9"
}
]
collection_pre_install: ''

0 comments on commit e237f63

Please sign in to comment.