summaryrefslogtreecommitdiff
path: root/.github/workflows/tests.yml
diff options
context:
space:
mode:
authorGomathiselviS <gomathiselvi@gmail.com>2022-06-16 10:31:25 +0530
committerGitHub <noreply@github.com>2022-06-16 10:31:25 +0530
commite66c1e127c7226167e648d7778a7c2a71b71f58d (patch)
treeacd6573ef61392e4a96994877f71da759c809f51 /.github/workflows/tests.yml
parent2c62d6d43189f8b79ffa9843923fab0c9633370e (diff)
downloadvyos-ansible-collection-e66c1e127c7226167e648d7778a7c2a71b71f58d.tar.gz
vyos-ansible-collection-e66c1e127c7226167e648d7778a7c2a71b71f58d.zip
Enable github actions for unit and sanity tests (#263)
Signed-off-by: GomathiselviS <gomathiselvi@gmail.com>
Diffstat (limited to '.github/workflows/tests.yml')
-rw-r--r--.github/workflows/tests.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..0a25f48
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,41 @@
+---
+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:
+ changelog:
+ uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
+ sanity:
+ uses: ansible-network/github_actions/.github/workflows/sanity.yml@main
+ unit-galaxy:
+ uses: ansible-network/github_actions/.github/workflows/unit_galaxy.yml@main
+ unit-source:
+ uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
+ with:
+ collection_pre_install: >-
+ git+https://github.com/ansible-collections/ansible.utils.git
+ git+https://github.com/ansible-collections/ansible.netcommon.git
+ all_green:
+ if: ${{ always() }}
+ needs:
+ - changelog
+ - sanity
+ - unit-galaxy
+ - unit-source
+ runs-on: ubuntu-latest
+ steps:
+ - run: >-
+ python -c "assert set([
+ '${{ needs.changelog.result }}',
+ '${{ needs.sanity.result }}',
+ '${{ needs.unit-galaxy.result }}',
+ '${{ needs.unit-source.result }}'
+ ]) == {'success'}"