Skip to content

Commit d02eb1a

Browse files
author
Cecylia Borek
committed
update test github workflow
1 parent 9446ca9 commit d02eb1a

File tree

1 file changed

+73
-19
lines changed

1 file changed

+73
-19
lines changed

.github/workflows/test.yml

Lines changed: 73 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,47 @@ name: Python CI
33
on: [push, workflow_dispatch]
44

55
jobs:
6-
build:
6+
unit-tests:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
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]
1712
include:
1813
- 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 }}
2724

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:
2835
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
2947

3048
steps:
3149
- name: Checkout code
@@ -37,13 +55,49 @@ jobs:
3755
- name: Setup Python
3856
uses: actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
3957
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 }}
4194

4295
- name: Install tox
4396
run: pip install tox
4497

45-
- name: Test Execution
46-
run: tox -e py
98+
- name: Run System Tests
99+
run: tox -e system
100+
47101
fossa-scan:
48102
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
49103
secrets: inherit

0 commit comments

Comments
 (0)