Skip to content

Commit 509dc6a

Browse files
committed
Add AppInspect stage
1 parent fa3bf04 commit 509dc6a

8 files changed

Lines changed: 39 additions & 5 deletions

File tree

.github/workflows/appinspect.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Validate SDK with Splunk AppInspect
2+
on: [ push, workflow_dispatch ]
3+
4+
env:
5+
PYTHON_VERSION: 3.13
6+
MOCK_APP_PATH: ./tests/system/test_apps/generating_app
7+
8+
jobs:
9+
appinspect:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
13+
- uses: ./.github/actions/setup-sdk-environment
14+
with:
15+
python-version: ${{ env.PYTHON_VERSION }}
16+
deps-group: lint
17+
- name: Install splunk-appinspect dependencies
18+
run: sudo apt-get install -y libmagic1
19+
- name: Install packages for the mock app
20+
run: |
21+
mkdir -p ${{ env.MOCK_APP_PATH }}/bin/lib
22+
uv pip install ".[openai, anthropic]" --target ${{ env.MOCK_APP_PATH }}/bin/lib
23+
- name: Copy splunklib to a test app and package it as a mock app
24+
run: |
25+
cd ${{ env.MOCK_APP_PATH }}
26+
tar -czf mock_app.tgz --exclude="__pycache__" bin default metadata
27+
- name: Validate mock app with splunk-appinspect
28+
run: uvx splunk-appinspect inspect ${{ env.MOCK_APP_PATH }}/mock_app.tgz
29+
--included-tags cloud

splunklib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ def setup_logging(
3232
logging.basicConfig(level=level, format=log_format, datefmt=date_format)
3333

3434

35-
__version_info__ = (2, 2, 0, "alpha")
35+
__version_info__ = (3, 0, 0)
3636
__version__ = ".".join(map(str, __version_info__))
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[script:execute]
2-
match = /execute
3-
scripttype = python
4-
handler = execute.Handler
5-
2+
match = /execute
3+
scripttype = python
4+
handler = execute.Handler
5+
python.required = 3.13

tests/system/test_apps/eventing_app/default/commands.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
filename = eventingcsc.py
33
chunked = true
44
python.version = python3
5+
python.required = 3.13

tests/system/test_apps/generating_app/default/commands.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
filename = generatingcsc.py
33
chunked = true
44
python.version = python3
5+
python.required = 3.13
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[modularinput]
22
python.version = python3
3+
python.required = 3.13

tests/system/test_apps/reporting_app/default/commands.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
filename = reportingcsc.py
33
chunked = true
44
python.version = python3
5+
python.required = 3.13

tests/system/test_apps/streaming_app/default/commands.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
filename = streamingcsc.py
33
chunked = true
44
python.version = python3
5+
python.required = 3.13

0 commit comments

Comments
 (0)