diff --git a/.github/workflows/appinspect.yml b/.github/workflows/appinspect.yml new file mode 100644 index 000000000..17cb5007a --- /dev/null +++ b/.github/workflows/appinspect.yml @@ -0,0 +1,29 @@ +name: Validate SDK with Splunk AppInspect +on: [ push, workflow_dispatch ] + +env: + PYTHON_VERSION: 3.13 + MOCK_APP_PATH: ./tests/system/test_apps/generating_app + +jobs: + appinspect: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - uses: ./.github/actions/setup-sdk-environment + with: + python-version: ${{ env.PYTHON_VERSION }} + deps-group: lint + - name: Install splunk-appinspect dependencies + run: sudo apt-get install -y libmagic1 + - name: Install packages for the mock app + run: | + mkdir -p ${{ env.MOCK_APP_PATH }}/bin/lib + uv pip install ".[openai, anthropic]" --target ${{ env.MOCK_APP_PATH }}/bin/lib + - name: Copy splunklib to a test app and package it as a mock app + run: | + cd ${{ env.MOCK_APP_PATH }} + tar -czf mock_app.tgz --exclude="__pycache__" bin default metadata + - name: Validate mock app with splunk-appinspect + run: uvx splunk-appinspect inspect ${{ env.MOCK_APP_PATH }}/mock_app.tgz + --included-tags cloud diff --git a/splunklib/__init__.py b/splunklib/__init__.py index 049193458..a6639738b 100644 --- a/splunklib/__init__.py +++ b/splunklib/__init__.py @@ -32,5 +32,5 @@ def setup_logging( logging.basicConfig(level=level, format=log_format, datefmt=date_format) -__version_info__ = (2, 2, 0, "alpha") +__version_info__ = (3, 0, 0) __version__ = ".".join(map(str, __version_info__)) diff --git a/tests/system/test_apps/cre_app/default/restmap.conf b/tests/system/test_apps/cre_app/default/restmap.conf index 2d9213910..678892e56 100644 --- a/tests/system/test_apps/cre_app/default/restmap.conf +++ b/tests/system/test_apps/cre_app/default/restmap.conf @@ -1,5 +1,5 @@ [script:execute] -match = /execute -scripttype = python -handler = execute.Handler - +match = /execute +scripttype = python +handler = execute.Handler +python.required = 3.13 diff --git a/tests/system/test_apps/eventing_app/default/commands.conf b/tests/system/test_apps/eventing_app/default/commands.conf index e365c285f..ac7d26d59 100644 --- a/tests/system/test_apps/eventing_app/default/commands.conf +++ b/tests/system/test_apps/eventing_app/default/commands.conf @@ -2,3 +2,4 @@ filename = eventingcsc.py chunked = true python.version = python3 +python.required = 3.13 diff --git a/tests/system/test_apps/generating_app/default/commands.conf b/tests/system/test_apps/generating_app/default/commands.conf index 1a5d6af82..9dcbc8f3a 100644 --- a/tests/system/test_apps/generating_app/default/commands.conf +++ b/tests/system/test_apps/generating_app/default/commands.conf @@ -2,3 +2,4 @@ filename = generatingcsc.py chunked = true python.version = python3 +python.required = 3.13 diff --git a/tests/system/test_apps/modularinput_app/default/inputs.conf b/tests/system/test_apps/modularinput_app/default/inputs.conf index 4377e32cf..dc4c9089b 100644 --- a/tests/system/test_apps/modularinput_app/default/inputs.conf +++ b/tests/system/test_apps/modularinput_app/default/inputs.conf @@ -1,2 +1,3 @@ [modularinput] python.version = python3 +python.required = 3.13 diff --git a/tests/system/test_apps/reporting_app/default/commands.conf b/tests/system/test_apps/reporting_app/default/commands.conf index 58a406af8..b992c5d9f 100644 --- a/tests/system/test_apps/reporting_app/default/commands.conf +++ b/tests/system/test_apps/reporting_app/default/commands.conf @@ -2,3 +2,4 @@ filename = reportingcsc.py chunked = true python.version = python3 +python.required = 3.13 diff --git a/tests/system/test_apps/streaming_app/default/commands.conf b/tests/system/test_apps/streaming_app/default/commands.conf index 49a38a8fa..1c52a5de8 100644 --- a/tests/system/test_apps/streaming_app/default/commands.conf +++ b/tests/system/test_apps/streaming_app/default/commands.conf @@ -2,3 +2,4 @@ filename = streamingcsc.py chunked = true python.version = python3 +python.required = 3.13