Skip to content

Commit

Permalink
Added unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Abhijeet Kasurde <[email protected]>
  • Loading branch information
Akasurde committed Nov 13, 2023
1 parent b7c5e49 commit aa8430f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/all_green_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ jobs:
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.sanity.result }}',
'${{ needs.units.result }}'
]) == {'success'}"
8 changes: 8 additions & 0 deletions .github/workflows/units.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
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
Empty file added tests/unit/__init__.py
Empty file.
Empty file added tests/unit/plugins/__init__.py
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit aa8430f

Please sign in to comment.