File tree Expand file tree Collapse file tree
actions/setup-sdk-environment Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Set up SDK environment
2+ description : Perform all the shared setup steps
3+
4+ inputs :
5+ python-version :
6+ description : Python version used for this run
7+ required : true
8+ deps-group :
9+ description : Dependency groups passed to `uv sync --group`
10+ required : true
11+
12+ runs :
13+ using : composite
14+ steps :
15+ - uses : astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57
16+ with :
17+ version : 0.11.6
18+ activate-environment : true
19+ python-version : ${{ inputs.python-version }}
20+ - name : Install dependencies from the ${{ inputs.deps-group }} group(s)
21+ run : SDK_DEPS_GROUP="${{ inputs.deps-group }}" make uv-sync-ci
22+ shell : bash
Original file line number Diff line number Diff line change 1- name : Python SDK CI
1+ name : Python SDK Lint
22on : [push, workflow_dispatch]
33
44jobs :
55 lint-stage :
66 runs-on : ubuntu-latest
77 steps :
88 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
9- - uses : astral-sh/ setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
9+ - uses : ./.github/actions/ setup-sdk-environment
1010 with :
11- activate-environment : true
11+ python-version : ${{ matrix.python-version }}
12+ deps-group : lint
1213 - name : Verify uv.lock is up-to-date
1314 run : uv lock --check
14- - name : Install dependencies with uv
15- run : SDK_DEPS_GROUP="lint" make uv-sync-ci
16- - name : Verify basedpyright baseline
15+ - name : Verify against basedpyright baseline
1716 run : uv run --frozen basedpyright
Original file line number Diff line number Diff line change @@ -2,30 +2,21 @@ name: Publish SDK to Test PyPI
22on : [workflow_dispatch]
33
44env :
5- PYTHON_VERSION : 3.9
5+ PYTHON_VERSION : 3.13
66
77jobs :
8- publish-sdk -test-pypi :
8+ publish-to -test-pypi :
99 runs-on : ubuntu-latest
1010 permissions :
1111 id-token : write
1212 environment :
1313 name : splunk-test-pypi
1414 steps :
15- - name : Checkout code
16- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
17- - name : Setup Python ${{ matrix.python-version }}
18- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
15+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
16+ - uses : ./.github/actions/setup-sdk-environment
1917 with :
20- python-version : ${{ matrix.python-version }}
21- cache : pip
22- - name : Setup uv
23- uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
24- with :
25- activate-environment : true
26- enable-cache : true
27- - name : Install dependencies
28- run : SDK_DEPS_GROUP="release" make uv-sync-ci
18+ python-version : ${{ env.PYTHON_VERSION }}
19+ deps-group : release
2920 - name : Build packages for distribution
3021 run : uv build
3122 - name : Publish packages to Test PyPI
Original file line number Diff line number Diff line change 77 PYTHON_VERSION : 3.13
88
99jobs :
10- publish-sdk -pypi :
10+ publish-to -pypi :
1111 runs-on : ubuntu-latest
1212 permissions :
1313 id-token : write
1414 environment :
1515 name : splunk-pypi
1616 steps :
17- - name : Checkout code
18- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
19- - name : Setup Python ${{ matrix.python-version }}
20- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
17+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
18+ - uses : ./.github/actions/setup-sdk-environment
2119 with :
22- python-version : ${{ matrix.python-version }}
23- cache : pip
24- - name : Setup uv
25- uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
26- with :
27- activate-environment : true
28- enable-cache : true
29- - name : Install dependencies
30- run : SDK_DEPS_GROUP="release" make uv-sync-ci
20+ python-version : ${{ env.PYTHON_VERSION }}
21+ deps-group : release
3122 - name : Build packages for distribution
3223 run : uv build
3324 - name : Publish packages to PyPI
34- uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
25+ uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
26+ with :
27+ repository-url : https://test.pypi.org/legacy/
3528 - name : Generate API reference
3629 run : make -C ./docs html
3730 - name : Upload docs artifact
38- uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
31+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
3932 with :
4033 name : python-sdk-docs
4134 path : docs/_build/html
Original file line number Diff line number Diff line change @@ -14,20 +14,11 @@ jobs:
1414 python-version : [3.13]
1515 splunk-version : [latest]
1616 steps :
17- - name : Checkout code
18- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
19- - name : Setup Python ${{ matrix.python-version }}
20- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
17+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
18+ - uses : ./.github/actions/setup-sdk-environment
2119 with :
2220 python-version : ${{ matrix.python-version }}
23- cache : pip
24- - name : Setup uv
25- uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
26- with :
27- activate-environment : true
28- enable-cache : true
29- - name : Install dependencies
30- run : SDK_DEPS_GROUP="test" make uv-sync-ci
21+ deps-group : test
3122 - name : Download Splunk MCP Server App
3223 run : uv run ./scripts/download_splunk_mcp_server_app.py
3324 env :
5041 INTERNAL_AI_CLIENT_SECRET : ${{ secrets.INTERNAL_AI_CLIENT_SECRET }}
5142 INTERNAL_AI_TOKEN_URL : ${{ secrets.INTERNAL_AI_TOKEN_URL }}
5243 INTERNAL_AI_BASE_URL : ${{ secrets.INTERNAL_AI_BASE_URL }}
53-
5444 - name : Restore pytest cache
55- if : ${{ github.ref }} != " refs/heads/master" && ${{ github.ref }} != " refs/heads/develop"
56- uses : actions/cache@565629816435f6c0b50676926c9b05c254113c0c
45+ if : ${{ github.ref != ' refs/heads/master' && github.ref != ' refs/heads/develop' }}
46+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
5747 with :
5848 path : .pytest_cache
5949 key : pytest-cache-${{ runner.os }}-py${{ matrix.python-version }}-${{ github.ref_name }}-${{ github.sha }}
Original file line number Diff line number Diff line change 1111 sphinx-build -b html -d $(BUILDDIR ) /doctrees . $(HTMLDIR )
1212 sh munge_links.sh $(HTMLDIR )
1313 @echo " [splunk-sdk] ---"
14- @echo " [splunk-sdk] Build finished. HTML pages available at docs/$( HTMLDIR) ."
14+ @echo " [splunk-sdk] Build finished. HTML pages available at docs/$( HTMLDIR) ."
You can’t perform that action at this time.
0 commit comments