Skip to content

Commit 61c74bd

Browse files
author
Cecylia Borek
committed
update test github workflow
1 parent e243ec3 commit 61c74bd

File tree

1 file changed

+73
-14
lines changed

1 file changed

+73
-14
lines changed

.github/workflows/test.yml

Lines changed: 73 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
11
name: Python CI
22

3-
on:
4-
[ push, workflow_dispatch ]
3+
on: [push, workflow_dispatch]
54

65
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
816

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
934
runs-on: ${{ matrix.os }}
1035
strategy:
1136
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"]
1940
include:
2041
- os: ubuntu-22.04
2142
python: 3.7
@@ -26,14 +47,51 @@ jobs:
2647
- os: ubuntu-22.04
2748
python: 3.7
2849
splunk-version: "latest"
50+
fail-fast: false
51+
52+
steps:
53+
- name: Checkout code
54+
uses: actions/checkout@v3
2955

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"
3088
fail-fast: false
3189

3290
steps:
3391
- name: Checkout code
3492
uses: actions/checkout@v3
3593

36-
- name: Run docker compose
94+
- name: Run docker compose (System)
3795
run: SPLUNK_VERSION=${{matrix.splunk-version}} docker compose up -d
3896

3997
- name: Setup Python
@@ -44,8 +102,9 @@ jobs:
44102
- name: Install tox
45103
run: pip install tox
46104

47-
- name: Test Execution
48-
run: tox -e py
105+
- name: Run System Tests
106+
run: tox -e system
107+
49108
fossa-scan:
50109
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
51-
secrets: inherit
110+
secrets: inherit

0 commit comments

Comments
 (0)