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.8'
27
+ - ' 3.9'
28
+ runs-on : >-
29
+ ${{ contains(fromJson(
30
+ '["stable-2.9", "stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
31
+ ), matrix.ansible) && 'ubuntu-22.04' || 'ubuntu-latest' }}
32
+ steps :
33
+
34
+ - name : Check out code
35
+ uses : actions/checkout@v2
36
+
37
+ - name : Perform sanity testing with ansible-test
38
+ uses : ansible-community/ansible-test-gh-action@release/v1
39
+ with :
40
+ ansible-core-version : ${{ matrix.ansible }}
41
+ target-python-version : ${{ matrix.python }}
42
+ testing-type : sanity
43
+
44
+
45
+ # units:
46
+ # runs-on: >-
47
+ # ${{ contains(fromJson(
48
+ # '["stable-2.10", "stable-2.11", "stable-2.12", "stable-2.13", "stable-2.14"]'
49
+ # ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
50
+ # name: Units (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
51
+ # strategy:
52
+ # # As soon as the first unit test fails, cancel the others to free up the CI queue
53
+ # fail-fast: true
54
+ # matrix:
55
+ # ansible:
56
+ # - stable-2.10
57
+ # - stable-2.11
58
+ # - stable-2.12
59
+ # - stable-2.13
60
+ # - stable-2.14
61
+ # - devel
62
+
63
+ # steps:
64
+ # - name: Check out code
65
+ # uses: actions/checkout@v2
66
+
67
+ # - name: Perform unit testing with ansible-test
68
+ # uses: ansible-community/ansible-test-gh-action@release/v1
69
+ # with:
70
+ # ansible-core-version: ${{ matrix.ansible }}
71
+ # testing-type: units
72
+ # test-deps: >-
73
+ # ansible.netcommon
74
+ # ansible.utils
75
+
76
+
77
+ # integration:
78
+ # runs-on: ubuntu-latest
79
+ # name: I (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
80
+ # strategy:
81
+ # fail-fast: false
82
+ # matrix:
83
+ # ansible:
84
+ # - stable-2.9 # Only if your collection supports Ansible 2.9
85
+ # - stable-2.10
86
+ # - stable-2.11
87
+ # - stable-2.12
88
+ # - stable-2.13
89
+ # - devel
90
+ # python:
91
+ # - 2.6
92
+ # - 2.7
93
+ # - 3.5
94
+ # - 3.6
95
+ # - 3.7
96
+ # - 3.8
97
+ # - 3.9
98
+ # exclude:
99
+ # # Because ansible-test doesn't support python3.9 for Ansible 2.9
100
+ # - ansible: stable-2.9
101
+ # python: 3.9
102
+ # - ansible: devel
103
+ # python: 2.6
104
+
105
+ # steps:
106
+ # - name: Check out code
107
+ # uses: actions/checkout@v2
108
+
109
+ # - name: Perform integration testing with ansible-test
110
+ # uses: ansible-community/ansible-test-gh-action@release/v1
111
+ # with:
112
+ # ansible-core-version: ${{ matrix.ansible }}
113
+ # python-version: 3.8
114
+ # pre-test-cmd: >-
115
+ # mkdir -p tests/output/
116
+ # touch tests/output/coverage
117
+ # target-python-version: ${{ matrix.python }}
118
+ # testing-type: integration
119
+ # test-deps: >-
120
+ # ansible.netcommon
121
+ # ansible.utils
0 commit comments