Debian Codegraph @

ansible_collections/community/vmware/.github/workflows/ansible-test.yml

raw
1 ---
2 # README FIRST
3 # 1. Subscribe to https://github.com/ansible-collections/news-for-maintainers
4 # (click the Watch button on the homepage > Custom > Issues)
5 # and keep this matrix up to date in accordance to related announcements.
6 # Timely add new ansible-core versions and consider dropping support
7 # and testing against its EOL versions.
8 # 2. If your collection repository is under the ansible-collections org,
9 # please keep in mind that the number of GHA jobs is limited
10 # and shared across all the collections in the org.
11 # So, focusing on good test coverage of your collection,
12 # please avoid testing against unnecessary entities such as
13 # ansible-core EOL versions your collection does not support
14 # or ansible-core versions that are not EOL yet but not supported by the collection.
15 # 3. If you don't have unit or integration tests, remove corresponding sections.
16 # 4. If your collection depends on other collections ensure they are installed,
17 # add them to the "test-deps" input.
18 # 5. For the comprehensive list of the inputs supported by the
19 # ansible-community/ansible-test-gh-action GitHub Action, see
20 # https://github.com/marketplace/actions/ansible-test.
21 # 6. If you want to prevent merging PRs that do not pass all tests,
22 # make sure to add the "check" job to your repository branch
23 # protection once this workflow is added.
24 # It is also possible to tweak which jobs are allowed to fail. See
25 # https://github.com/marketplace/actions/alls-green#gotchas for more detail.
26 # 7. If you need help please ask in #community:ansible.com on Matrix
27 # or in bridged #ansible-community on the Libera.Chat IRC channel.
28 # See https://docs.ansible.com/ansible/devel/community/communication.html
29 # for details.
30 # 8. If your collection is [going to get] included in the Ansible package,
31 # it has to adhere to Python compatibility and CI testing requirements described in
32 # https://docs.ansible.com/ansible/latest/community/collection_contributors/collection_requirements.html.
33
34 name: CI
35 on:
36 # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
37 push:
38 branches:
39 - main
40 - stable-4.x
41 - stable-5.x
42 pull_request:
43 # Run CI once per day (at 07:12 UTC)
44 # This ensures that even if there haven't been commits that we are still
45 # testing against latest version of ansible-test for each ansible-core
46 # version
47 schedule:
48 - cron: '12 7 * * *'
49
50 concurrency:
51 group: >-
52 ${{ github.workflow }}-${{
53 github.event.pull_request.number || github.sha
54 }}
55 cancel-in-progress: true
56
57 jobs:
58
59 ###
60 # Sanity tests (REQUIRED)
61 #
62 # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
63
64 sanity:
65 name: Sanity (Ⓐ${{ matrix.ansible }})
66 strategy:
67 matrix:
68 ansible:
69 # It's important that Sanity is tested against all stable-X.Y branches
70 # Testing against `devel` may fail as new tests are added.
71 # An alternative to `devel` is the `milestone` branch with
72 # gets synchronized with `devel` every few weeks and therefore
73 # tends to be a more stable target. Be aware that it is not updated
74 # around creation of a new stable branch, this might cause a problem
75 # that two different versions of ansible-test use the same sanity test
76 # ignore.txt file.
77 # Add new versions announced in
78 # https://github.com/ansible-collections/news-for-maintainers in a timely manner,
79 # consider dropping testing against EOL versions and versions you don't support.
80 # - stable-2.15
81 # - stable-2.16
82 # - stable-2.17
83 # - stable-2.18
84 - stable-2.19
85 - stable-2.20
86 # - devel
87 - milestone
88 runs-on: ubuntu-latest
89
90 steps:
91 # Run sanity tests inside a Docker container.
92 # The docker container has all the pinned dependencies that are
93 # required and all Python versions Ansible supports.
94 - name: Perform sanity testing
95 # See the documentation for the following GitHub action on
96 # https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md
97 uses: ansible-community/ansible-test-gh-action@release/v1
98 with:
99 ansible-core-version: ${{ matrix.ansible }}
100 testing-type: sanity
101 # OPTIONAL If your sanity tests require code
102 # from other collections, install them like this
103 test-deps: >-
104 vmware.vmware
105 # ansible.netcommon
106 # ansible.utils
107 # OPTIONAL If set to true, will test only against changed files,
108 # which should improve CI performance. See limitations on
109 # https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection
110 pull-request-change-detection: false
111 # Disable Codecov
112 coverage: never
113
114 ###
115 # Unit tests (OPTIONAL)
116 #
117 # https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html
118
119 units:
120 runs-on: ubuntu-latest
121
122 name: Units (Ⓐ${{ matrix.ansible }})
123 strategy:
124 # As soon as the first unit test fails, cancel the others to free up the CI queue
125 fail-fast: true
126 matrix:
127 ansible:
128 # Add new versions announced in
129 # https://github.com/ansible-collections/news-for-maintainers in a timely manner,
130 # consider dropping testing against EOL versions and versions you don't support.
131 # - stable-2.15
132 # - stable-2.16
133 # - stable-2.17
134 # - stable-2.18
135 - stable-2.19
136 - stable-2.20
137 # - devel
138 - milestone
139
140 steps:
141 - name: >-
142 Perform unit testing against
143 Ansible version ${{ matrix.ansible }}
144 # See the documentation for the following GitHub action on
145 # https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md
146 uses: ansible-community/ansible-test-gh-action@release/v1
147 with:
148 ansible-core-version: ${{ matrix.ansible }}
149 testing-type: units
150 # OPTIONAL If your unit tests require code
151 # from other collections, install them like this
152 test-deps: >-
153 ansible.netcommon
154 ansible.utils
155 vmware.vmware
156 # OPTIONAL If set to true, will test only against changed files,
157 # which should improve CI performance. See limitations on
158 # https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection
159 pull-request-change-detection: false
160 # Disable Codecov
161 coverage: never
162
163 check: # This job does nothing and is only used for the branch protection
164 # or multi-stage CI jobs, like making sure that all tests pass before
165 # a publishing job is started.
166 if: always()
167
168 needs:
169 - sanity
170 - units
171
172 runs-on: ubuntu-latest
173
174 steps:
175 - name: Decide whether the needed jobs succeeded or failed
176 uses: re-actors/alls-green@release/v1
177 with:
178 jobs: ${{ toJSON(needs) }}