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