@@ -3,29 +3,47 @@ name: Python CI
3
3
on : [push, workflow_dispatch]
4
4
5
5
jobs :
6
- build :
6
+ unit-tests :
7
7
runs-on : ${{ matrix.os }}
8
8
strategy :
9
9
matrix :
10
- os :
11
- - ubuntu-latest
12
- python : [3.9, 3.13]
13
- splunk-version :
14
- - " 8.1"
15
- - " 8.2"
16
- - " latest"
10
+ os : [ubuntu-latest]
11
+ python-version : [3.9, 3.13]
17
12
include :
18
13
- os : ubuntu-22.04
19
- python : 3.7
20
- splunk-version : " 8.1"
21
- - os : ubuntu-22.04
22
- python : 3.7
23
- splunk-version : " 8.2"
24
- - os : ubuntu-22.04
25
- python : 3.7
26
- splunk-version : " latest"
14
+ python-version : 3.7
15
+ fail-fast : false
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
19
+
20
+ - name : Setup Python
21
+ uses : actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
22
+ with :
23
+ python-version : ${{ matrix.python-version }}
27
24
25
+ - name : Install tox
26
+ run : pip install tox
27
+
28
+ - name : Run Unit Tests
29
+ run : tox -e unit
30
+
31
+ integration-tests :
32
+ needs : unit-tests
33
+ runs-on : ${{ matrix.os }}
34
+ strategy :
28
35
fail-fast : false
36
+ matrix :
37
+ os : [ubuntu-latest]
38
+ python-version : [3.9]
39
+ splunk-version : [9.4, latest]
40
+ include :
41
+ - os : ubuntu-22.04
42
+ python-version : 3.7
43
+ splunk-version : " 9.1"
44
+ - os : ubuntu-latest
45
+ python-version : 3.13
46
+ splunk-version : latest
29
47
30
48
steps :
31
49
- name : Checkout code
@@ -37,13 +55,49 @@ jobs:
37
55
- name : Setup Python
38
56
uses : actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
39
57
with :
40
- python-version : ${{ matrix.python }}
58
+ python-version : ${{ matrix.python-version }}
59
+
60
+ - name : Install tox
61
+ run : pip install tox
62
+
63
+ - name : Run Integration Tests
64
+ run : tox -e integration
65
+
66
+ system-tests :
67
+ needs : [unit-tests, integration-tests]
68
+ runs-on : ${{ matrix.os }}
69
+ strategy :
70
+ fail-fast : false
71
+ matrix :
72
+ os : [ubuntu-latest]
73
+ python-version : [3.9]
74
+ splunk-version : [9.4, latest]
75
+ include :
76
+ - os : ubuntu-22.04
77
+ python-version : 3.7
78
+ splunk-version : " 9.1"
79
+ - os : ubuntu-latest
80
+ python-version : 3.13
81
+ splunk-version : latest
82
+
83
+ steps :
84
+ - name : Checkout code
85
+ uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
86
+
87
+ - name : Run docker compose (System)
88
+ run : SPLUNK_VERSION=${{matrix.splunk-version}} docker compose up -d
89
+
90
+ - name : Setup Python
91
+ uses : actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
92
+ with :
93
+ python-version : ${{ matrix.python-version }}
41
94
42
95
- name : Install tox
43
96
run : pip install tox
44
97
45
- - name : Test Execution
46
- run : tox -e py
98
+ - name : Run System Tests
99
+ run : tox -e system
100
+
47
101
fossa-scan :
48
102
uses : splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
49
103
secrets : inherit
0 commit comments