WBS-7.9: trim CI cache-hit overhead and wait for deploy readiness
This commit is contained in:
+16
-4
@@ -5,6 +5,7 @@ on:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────
|
||||
# Synology DS216j (ARMv7l 32-bit) 환경 제약
|
||||
@@ -70,8 +71,13 @@ jobs:
|
||||
ls -dt "$VENV_BASE"/*/ 2>/dev/null | tail -n +3 | xargs rm -rf 2>/dev/null || true
|
||||
else
|
||||
echo "=== venv 캐시 히트: $("$VENV/bin/python" --version 2>&1) ==="
|
||||
"$VENV/bin/python" - <<'PY'
|
||||
import importlib
|
||||
for mod in ("requests", "yaml", "openpyxl"):
|
||||
importlib.import_module(mod)
|
||||
print("venv dependency import check: PASS")
|
||||
PY
|
||||
fi
|
||||
"$VENV/bin/pip" install requests pyyaml openpyxl --quiet
|
||||
echo "$VENV/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install Node Dependencies
|
||||
@@ -84,9 +90,15 @@ jobs:
|
||||
|
||||
if [ -d "$CACHE_DIR/node_modules" ]; then
|
||||
echo "=== node_modules 캐시 히트: $LOCK_HASH ==="
|
||||
# 캐시에서 심볼릭 링크로 연결 (복사 대신 즉시)
|
||||
rm -rf node_modules
|
||||
ln -s "$CACHE_DIR/node_modules" node_modules
|
||||
# 이미 같은 캐시를 가리키고 있으면 재연결하지 않음
|
||||
if [ -L node_modules ] && [ "$(readlink node_modules)" = "$CACHE_DIR/node_modules" ]; then
|
||||
echo "=== node_modules already linked to cache ==="
|
||||
else
|
||||
if [ -e node_modules ] || [ -L node_modules ]; then
|
||||
rm -rf node_modules
|
||||
fi
|
||||
ln -s "$CACHE_DIR/node_modules" node_modules
|
||||
fi
|
||||
else
|
||||
echo "=== npm install (최초 or lock 변경) ==="
|
||||
npm install --quiet
|
||||
|
||||
Reference in New Issue
Block a user