Skip to content

Commit 111dda9

Browse files
chore: adjust deps installation for unit tests
1 parent 487713d commit 111dda9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ on:
5757
description: "Forces WFE tests to run only on the latest Splunk when set to true. When set to false - will run on all supported Splunk versions required for the release. When not set - default behavior."
5858
type: string
5959
default: "false"
60+
python-version:
61+
required: false
62+
description: "Python version to use for testing"
63+
type: string
64+
default: "3.9"
6065
secrets:
6166
GH_TOKEN_ADMIN:
6267
description: Github admin token
@@ -110,7 +115,7 @@ concurrency:
110115
group: ${{ github.head_ref || github.run_id }}
111116
cancel-in-progress: true
112117
env:
113-
PYTHON_VERSION: "3.13"
118+
PYTHON_VERSION: ${{ inputs.python-version }}
114119
POETRY_VERSION: "2.1.4"
115120
POETRY_EXPORT_PLUGIN_VERSION: "1.9.0"
116121
GS_IMAGE_VERSION: "1.0.0"
@@ -489,16 +494,13 @@ jobs:
489494
run: |
490495
if [ -f "poetry.lock" ]
491496
then
492-
python${{ env.PYTHON_VERSION }} -m pip install poetry==${{ env.POETRY_VERSION }} poetry-plugin-export==${{ env.POETRY_EXPORT_PLUGIN_VERSION }}
497+
python${{ env.PYTHON_VERSION }} -m pip install poetry==${{ env.POETRY_VERSION }} poetry-plugin-export==${{ env.POETRY_EXPORT_PLUGIN_VERSION }}
493498
mkdir -p package/lib || true
494499
poetry check --lock
495500
poetry export --without-hashes --with dev -o package/lib/requirements.txt
496-
fi
497-
if [ ! -f dev_deps/requirements_dev.txt ]; then
498-
echo "No dev_deps/requirements_dev.txt. Migrate your dependencies to dev_deps/requirements_dev.txt"
499-
exit 1
500-
else
501-
echo "Found dev_deps/requirements_dev.txt. Installing dev dependencies in an isolated environment";
501+
else:
502+
echo "No poetry.lock found, make sure your dependencies are managed through poetry, exiting"
503+
exit 1
502504
fi
503505
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
504506
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://[email protected]

0 commit comments

Comments
 (0)