diff --git a/.github/workflows/all_green_check.yml b/.github/workflows/all_green_check.yml index bdec73f9..f594c597 100644 --- a/.github/workflows/all_green_check.yml +++ b/.github/workflows/all_green_check.yml @@ -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'}" diff --git a/.github/workflows/units.yml b/.github/workflows/units.yml new file mode 100644 index 00000000..d05d8c10 --- /dev/null +++ b/.github/workflows/units.yml @@ -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 diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/plugins/__init__.py b/tests/unit/plugins/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/plugins/action/__init__.py b/tests/unit/plugins/action/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/plugins/inventory/__init__.py b/tests/unit/plugins/inventory/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/plugins/modules/__init__.py b/tests/unit/plugins/modules/__init__.py new file mode 100644 index 00000000..e69de29b