summaryrefslogtreecommitdiffstats
path: root/collections-debian-merged/ansible_collections/community/fortios/.github
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 20:03:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 20:03:01 +0000
commita453ac31f3428614cceb99027f8efbdb9258a40b (patch)
treef61f87408f32a8511cbd91799f9cececb53e0374 /collections-debian-merged/ansible_collections/community/fortios/.github
parentInitial commit. (diff)
downloadansible-upstream.tar.xz
ansible-upstream.zip
Adding upstream version 2.10.7+merged+base+2.10.8+dfsg.upstream/2.10.7+merged+base+2.10.8+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collections-debian-merged/ansible_collections/community/fortios/.github')
-rw-r--r--collections-debian-merged/ansible_collections/community/fortios/.github/workflows/ansible-test.yml117
1 files changed, 117 insertions, 0 deletions
diff --git a/collections-debian-merged/ansible_collections/community/fortios/.github/workflows/ansible-test.yml b/collections-debian-merged/ansible_collections/community/fortios/.github/workflows/ansible-test.yml
new file mode 100644
index 00000000..84667383
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/community/fortios/.github/workflows/ansible-test.yml
@@ -0,0 +1,117 @@
+# README FIRST
+# 1. If you don't have unit tests remove that section
+# 2. If your collection depends on other collections ensure they are installed, see "Install collection dependencies"
+# If you need help please ask in #ansible-devel on Freenode IRC
+
+name: CI
+on:
+ # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
+ push:
+ pull_request:
+ schedule:
+ - cron: '0 6 * * *'
+env:
+ NAMESPACE: community
+ COLLECTION_NAME: fortios
+
+jobs:
+
+###
+# Sanity tests (REQUIRED)
+#
+# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
+
+ sanity:
+ name: Sanity (Ⓐ${{ matrix.ansible }})
+ strategy:
+ matrix:
+ ansible:
+ # It's important that Sanity is tested against all stable-X.Y branches
+ # Testing against `devel` may fail as new tests are added.
+ - stable-2.9
+ - stable-2.10
+ - devel
+ runs-on: ubuntu-latest
+ steps:
+
+ # ansible-test requires the collection to be in a directory in the form
+ # .../ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/
+
+ - name: Check out code
+ uses: actions/checkout@v2
+ with:
+ path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ # it is just required to run that once as "ansible-test sanity" in the docker image
+ # will run on all python versions it supports.
+ python-version: 3.8
+
+ # Install the head of the given branch (devel, stable-2.10)
+ - name: Install ansible-base (${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ - name: Install collection dependencies
+ run: ansible-galaxy collection install fortinet.fortios -p .
+
+ # run ansible-test sanity inside of Docker.
+ # The docker container has all the pinned dependencies that are required
+ # and all python versions ansible supports.
+ - name: Run sanity tests
+ run: ansible-test sanity --docker -v --color
+ working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+###
+# Unit tests (OPTIONAL)
+#
+# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
+
+ units:
+ runs-on: ubuntu-latest
+ name: Units (Ⓐ${{ matrix.ansible }})
+ strategy:
+ # As soon as the first unit test fails, cancel the others to free up the CI queue
+ fail-fast: true
+ matrix:
+ ansible:
+ - stable-2.9
+ - stable-2.10
+ - devel
+
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+ with:
+ path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ # it is just required to run that once as "ansible-test units" in the docker image
+ # will run on all python versions it supports.
+ python-version: 3.8
+
+ - name: Install ansible-base (${{ matrix.ansible }})
+ run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
+
+ # OPTIONAL If your unit test requires Python libraries from other collections
+ # Install them like this
+ - name: Install collection dependencies
+ run: ansible-galaxy collection install fortinet.fortios -p .
+
+ # Run the unit tests
+ - name: Run unit test
+ run: ansible-test units -v --color --docker --coverage
+ working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ # ansible-test support producing code coverage date
+ - name: Generate coverage report
+ run: ansible-test coverage xml -v --requirements --group-by command --group-by version
+ working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ # See the reports at https://codecov.io/gh/GITHUBORG/REPONAME
+ - uses: codecov/codecov-action@v1
+ with:
+ fail_ci_if_error: false