fix: configure npm registry mirror (npmmirror) in CI workflows
Deploy Dashboard (Dev) / Backend Tests (push) Successful in 20m13s
Deploy Dashboard (Dev) / Frontend Tests (push) Successful in 52s
Run Tests / Secret Detection (pull_request) Successful in 2m42s
Run Tests / Backend Tests (pull_request) Successful in 35m32s
Run Tests / Frontend Tests (pull_request) Failing after 47s
Deploy Dashboard (Dev) / Deploy to Dev (push) Failing after 3s

CI runner can't reach npmjs.org through GFW. Use npmmirror.com
mirror for npm package installs, same pattern as pip uses
Tsinghua mirror for backend deps.
This commit is contained in:
Gan, Jimmy
2026-05-07 00:02:36 +08:00
parent deda3f5104
commit 6c08fc007a
6 changed files with 96 additions and 4 deletions
+1
View File
@@ -122,6 +122,7 @@ jobs:
NODE_OPTIONS: "--max-old-space-size=2048"
run: |
cd dashboard/frontend
npm config set registry https://registry.npmmirror.com || true
if [ "${{ steps.cache-node.outputs.cache-hit }}" = "true" ]; then
echo "Restoring from cache $CACHE_KEY..."
if cp -a $CACHE_DIR/node_modules . && [ -d node_modules ]; then