@@ -2,7 +2,25 @@ name: Python CI
2
2
on : [push, workflow_dispatch]
3
3
4
4
jobs :
5
- build :
5
+ unit-tests :
6
+ runs-on : ${{ matrix.os }}
7
+ strategy :
8
+ matrix :
9
+ os : [ubuntu-latest]
10
+ python-version : [3.9, 3.13]
11
+ include :
12
+ - os : ubuntu-22.04
13
+ python-version : 3.7
14
+ fail-fast : false
15
+ steps :
16
+ - uses : ./.github/workflows/setup-python.yml
17
+ with :
18
+ python-version : ${{ matrix.python-version }}
19
+ - name : Run Unit Tests
20
+ run : tox -e py -- tests/unit
21
+
22
+ integration-tests :
23
+ needs : unit-tests
6
24
runs-on : ${{ matrix.os }}
7
25
strategy :
8
26
fail-fast : false
@@ -11,25 +29,54 @@ jobs:
11
29
python-version : [3.9]
12
30
splunk-version : [9.4, latest]
13
31
include :
14
- # Oldest possible configuration
15
- # Last Ubuntu version with Python 3.7 binaries available
16
32
- os : ubuntu-22.04
17
33
python-version : 3.7
18
- splunk-version : 9.1
19
- # Latest possible configuration
34
+ splunk-version : " 9.1"
20
35
- os : ubuntu-latest
21
36
python-version : 3.13
22
37
splunk-version : latest
23
38
steps :
24
- - name : Checkout code
25
- uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
39
+ - uses : ./.github/workflows/setup-python.yml
40
+ with :
41
+ python-version : ${{ matrix.python-version }}
42
+ os : ${{ matrix.os }}
43
+
26
44
- name : Run docker compose
27
45
run : SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
28
- - name : Setup Python
29
- uses : actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
46
+
47
+ - name : Wait for Splunk setup completion
48
+ run : make wait_up
49
+
50
+ - name : Run integration tests
51
+ run : tox -e py -- tests/integration
52
+
53
+ system-tests :
54
+ needs : unit-tests
55
+ runs-on : ${{ matrix.os }}
56
+ strategy :
57
+ fail-fast : false
58
+ matrix :
59
+ os : [ubuntu-latest]
60
+ python-version : [3.9]
61
+ splunk-version : [9.4, latest]
62
+ include :
63
+ - os : ubuntu-22.04
64
+ python-version : 3.7
65
+ splunk-version : " 9.1"
66
+ - os : ubuntu-latest
67
+ python-version : 3.13
68
+ splunk-version : latest
69
+ steps :
70
+ - uses : ./.github/workflows/setup-python.yml
30
71
with :
31
72
python-version : ${{ matrix.python-version }}
32
- - name : Install tox
33
- run : pip install tox
34
- - name : Test Execution
35
- run : tox -e py
73
+ os : ${{ matrix.os }}
74
+
75
+ - name : Run docker compose (System)
76
+ run : SPLUNK_VERSION=${{matrix.splunk-version}} docker compose up -d
77
+
78
+ - name : Wait for Splunk setup completion
79
+ run : make wait_up
80
+
81
+ - name : Run System Tests
82
+ run : tox -e py -- tests/system
0 commit comments