Skip to content

Commit 62f6557

Browse files
author
Cecylia Borek
committed
update test github workflow
1 parent 73b731c commit 62f6557

File tree

1 file changed

+71
-10
lines changed

1 file changed

+71
-10
lines changed

.github/workflows/test.yml

Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,40 @@ 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
10+
os: [ubuntu-latest]
1211
python: [3.9, 3.13]
13-
splunk-version:
14-
- "8.1"
15-
- "8.2"
16-
- "latest"
12+
include:
13+
- os: ubuntu-22.04
14+
python: 3.7
15+
fail-fast: false
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
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
34+
runs-on: ${{ matrix.os }}
35+
strategy:
36+
matrix:
37+
os: [ubuntu-latest]
38+
python: [3.9, 3.13]
39+
splunk-version: ["8.1", "8.2", "latest"]
1740
include:
1841
- os: ubuntu-22.04
1942
python: 3.7
@@ -24,7 +47,6 @@ jobs:
2447
- os: ubuntu-22.04
2548
python: 3.7
2649
splunk-version: "latest"
27-
2850
fail-fast: false
2951

3052
steps:
@@ -42,8 +64,47 @@ jobs:
4264
- name: Install tox
4365
run: pip install tox
4466

45-
- name: Test Execution
46-
run: tox -e py
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"
88+
fail-fast: false
89+
90+
steps:
91+
- name: Checkout code
92+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
93+
94+
- name: Run docker compose (System)
95+
run: SPLUNK_VERSION=${{matrix.splunk-version}} docker compose up -d
96+
97+
- name: Setup Python
98+
uses: actions/setup-python@9322b3ca74000aeb2c01eb777b646334015ddd72
99+
with:
100+
python-version: ${{ matrix.python }}
101+
102+
- name: Install tox
103+
run: pip install tox
104+
105+
- name: Run System Tests
106+
run: tox -e system
107+
47108
fossa-scan:
48109
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
49110
secrets: inherit

0 commit comments

Comments
 (0)