Debian Codegraph @

ansible_collections/cisco/ucs/.github/workflows/main.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 pull_request:
41 # Run CI once per day (at 06:00 UTC)
42 # This ensures that even if there haven't been commits that we are still
43 # testing against latest version of ansible-test for each ansible-core
44 # version
45 schedule:
46 - cron: '0 6 * * *'
47
48 concurrency:
49 group: >-
50 ${{ github.workflow }}-${{
51 github.event.pull_request.number || github.sha
52 }}
53 cancel-in-progress: true
54
55 jobs:
56
57 ###
58 # Sanity tests (REQUIRED)
59 #
60 # https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html
61
62 sanity:
63 name: Sanity (Ⓐ${{ matrix.ansible }})
64 strategy:
65 matrix:
66 ansible:
67 # It's important that Sanity is tested against all stable-X.Y branches
68 # Testing against `devel` may fail as new tests are added.
69 # An alternative to `devel` is the `milestone` branch with
70 # gets synchronized with `devel` every few weeks and therefore
71 # tends to be a more stable target. Be aware that it is not updated
72 # around creation of a new stable branch, this might cause a problem
73 # that two different versions of ansible-test use the same sanity test
74 # ignore.txt file.
75 # Add new versions announced in
76 # https://github.com/ansible-collections/news-for-maintainers in a timely manner,
77 # consider dropping testing against EOL versions and versions you don't support.
78 - stable-2.15
79 - stable-2.16
80 - stable-2.17
81 # Ansible-test on various stable branches does not yet work well with cgroups v2.
82 # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
83 # image for these stable branches. The list of branches where this is necessary will
84 # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28
85 # for the latest list.
86 runs-on: >-
87 ${{ contains(fromJson(
88 '["stable-2.9", "stable-2.10", "stable-2.11"]'
89 ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
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 # ansible.netcommon
105 # ansible.utils
106 # OPTIONAL If set to true, will test only against changed files,
107 # which should improve CI performance. See limitations on
108 # https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection
109 pull-request-change-detection: false
110
111 check: # This job does nothing and is only used for the branch protection
112 # or multi-stage CI jobs, like making sure that all tests pass before
113 # a publishing job is started.
114 if: always()
115
116 needs:
117 - sanity
118
119 runs-on: ubuntu-latest
120
121 steps:
122 - name: Decide whether the needed jobs succeeded or failed
123 uses: re-actors/alls-green@release/v1
124 with:
125 jobs: ${{ toJSON(needs) }}