Skip to content

Commit 6013588

Browse files
committed
feat: use constraints.txt for deterministic deps
1 parent f311379 commit 6013588

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
python -m pip install --upgrade pip
6262
python -m pip install --upgrade pip
6363
# Install non-git packages first to avoid cross-package dependency conflicts
64-
grep -vE "^\s*(#|$)|git\+" requirements.txt | xargs -r python -m pip install
64+
grep -vE "^\s*(#|$)|git\+" requirements.txt | xargs -r python -m pip install -c https://raw.githubusercontent.com/QuantStrategyLab/QuantPlatformKit/fe4341b08f1f026a21ca07c4752e48ed2640cc07/constraints.txt
6565
# Install git-based packages individually with --no-deps
6666
grep 'git+' requirements.txt | while IFS= read -r pkg; do
6767
[ -n "$pkg" ] && python -m pip install --no-deps "$pkg"

.github/workflows/sync-cloud-run-env.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
INPUT_LONGPORT_SECRET_NAME: ${{ inputs.longport_secret_name }}
106106
INPUT_LONGPORT_APP_KEY_SECRET_NAME: ${{ inputs.longport_app_key_secret_name }}
107107
INPUT_LONGPORT_APP_SECRET_SECRET_NAME: ${{ inputs.longport_app_secret_secret_name }}
108+
CONSTRAINTS_URL: https://raw.githubusercontent.com/QuantStrategyLab/QuantPlatformKit/fe4341b08f1f026a21ca07c4752e48ed2640cc07/constraints.txt
108109
INPUT_DEPLOY_IMAGE: ${{ inputs.deploy_image }}
109110
INPUT_SYNC_ENV: ${{ inputs.sync_env }}
110111
GCP_ARTIFACT_REGISTRY_HOSTNAME: ${{ vars.GCP_ARTIFACT_REGISTRY_HOSTNAME }}
@@ -240,7 +241,8 @@ jobs:
240241
fi
241242
242243
if [ "${GITHUB_EVENT_NAME:-}" = "workflow_dispatch" ] && [ "${WORKFLOW_TARGET:-configured}" = "hk-verify" ]; then
243-
if [ "${INPUT_DEPLOY_IMAGE:-true}" = "true" ]; then
244+
if [ "${CONSTRAINTS_URL: https://raw.githubusercontent.com/QuantStrategyLab/QuantPlatformKit/fe4341b08f1f026a21ca07c4752e48ed2640cc07/constraints.txt
245+
INPUT_DEPLOY_IMAGE:-true}" = "true" ]; then
244246
deploy_enabled=true
245247
fi
246248
if [ "${INPUT_SYNC_ENV:-true}" = "true" ]; then
@@ -327,7 +329,8 @@ jobs:
327329
if [ -n "${INPUT_LONGPORT_APP_SECRET_SECRET_NAME:-}" ]; then
328330
echo "LONGPORT_APP_SECRET_SECRET_NAME=${INPUT_LONGPORT_APP_SECRET_SECRET_NAME}" >> "$GITHUB_ENV"
329331
fi
330-
if [ "${INPUT_DEPLOY_IMAGE:-true}" != "true" ]; then
332+
if [ "${CONSTRAINTS_URL: https://raw.githubusercontent.com/QuantStrategyLab/QuantPlatformKit/fe4341b08f1f026a21ca07c4752e48ed2640cc07/constraints.txt
333+
INPUT_DEPLOY_IMAGE:-true}" != "true" ]; then
331334
echo "CLOUD_RUN_ENV_SYNC_WAIT_FOR_COMMIT=false" >> "$GITHUB_ENV"
332335
fi
333336

0 commit comments

Comments
 (0)