1
+ name : CI
2
+ on :
3
+ # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
4
+ push :
5
+ pull_request :
6
+ # Run CI once per day (at 06:00 UTC)
7
+ # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version
8
+ schedule :
9
+ - cron : ' 0 6 * * *'
10
+ env :
11
+ NAMESPACE : stdevel
12
+ COLLECTION_NAME : landscape
13
+
14
+ jobs :
15
+ sanity :
16
+ name : Sanity (Ⓐ${{ matrix.ansible }})
17
+ strategy :
18
+ matrix :
19
+ ansible :
20
+ - stable-2.10
21
+ - stable-2.11
22
+ - stable-2.12
23
+ - stable-2.13
24
+ - stable-2.14
25
+ python :
26
+ - 3.6
27
+ - 3.7
28
+ - 3.8
29
+ - 3.9
30
+ - 3.10
31
+ - 3.11
32
+ runs-on : >-
33
+ ${{ contains(fromJson(
34
+ '["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
35
+ ), matrix.ansible) && 'ubuntu-22.04' || 'ubuntu-latest' }}
36
+ steps :
37
+
38
+ - name : Check out code
39
+ uses : actions/checkout@v2
40
+
41
+ - name : Perform sanity testing with ansible-test
42
+ uses : ansible-community/ansible-test-gh-action@release/v1
43
+ with :
44
+ ansible-core-version : ${{ matrix.ansible }}
45
+ target-python-version : ${{ matrix.python }}
46
+ testing-type : sanity
47
+
48
+
49
+ # units:
50
+ # runs-on: >-
51
+ # ${{ contains(fromJson(
52
+ # '["stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
53
+ # ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
54
+ # name: Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
55
+ # strategy:
56
+ # # As soon as the first unit test fails, cancel the others to free up the CI queue
57
+ # fail-fast: true
58
+ # matrix:
59
+ # ansible:
60
+ # - stable-2.10
61
+ # - stable-2.11
62
+ # - stable-2.12
63
+ # - stable-2.13
64
+ # - stable-2.14
65
+ # - devel
66
+
67
+ # steps:
68
+ # - name: Check out code
69
+ # uses: actions/checkout@v2
70
+
71
+ # - name: Perform unit testing with ansible-test
72
+ # uses: ansible-community/ansible-test-gh-action@release/v1
73
+ # with:
74
+ # ansible-core-version: ${{ matrix.ansible }}
75
+ # testing-type: units
76
+ # test-deps: >-
77
+ # ansible.netcommon
78
+ # ansible.utils
79
+
80
+
81
+ # integration:
82
+ # runs-on: ubuntu-latest
83
+ # name: I (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
84
+ # strategy:
85
+ # fail-fast: false
86
+ # matrix:
87
+ # ansible:
88
+ # - stable-2.9 # Only if your collection supports Ansible 2.9
89
+ # - stable-2.10
90
+ # - stable-2.11
91
+ # - stable-2.12
92
+ # - stable-2.13
93
+ # - devel
94
+ # python:
95
+ # - 2.6
96
+ # - 2.7
97
+ # - 3.5
98
+ # - 3.6
99
+ # - 3.7
100
+ # - 3.8
101
+ # - 3.9
102
+ # exclude:
103
+ # # Because ansible-test doesn't support python3.9 for Ansible 2.9
104
+ # - ansible: stable-2.9
105
+ # python: 3.9
106
+ # - ansible: devel
107
+ # python: 2.6
108
+
109
+ # steps:
110
+ # - name: Check out code
111
+ # uses: actions/checkout@v2
112
+
113
+ # - name: Perform integration testing with ansible-test
114
+ # uses: ansible-community/ansible-test-gh-action@release/v1
115
+ # with:
116
+ # ansible-core-version: ${{ matrix.ansible }}
117
+ # python-version: 3.8
118
+ # pre-test-cmd: >-
119
+ # mkdir -p tests/output/
120
+ # touch tests/output/coverage
121
+ # target-python-version: ${{ matrix.python }}
122
+ # testing-type: integration
123
+ # test-deps: >-
124
+ # ansible.netcommon
125
+ # ansible.utils
0 commit comments