chore: configure npm proxy in ci
Some checks failed
CI / build-and-test (push) Failing after 8m36s
CI / deploy (push) Has been skipped

This commit is contained in:
SpecialX
2026-02-25 13:34:34 +08:00
parent 0f38e97b4e
commit bd8a4d39a6

View File

@@ -31,15 +31,16 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-node- ${{ runner.os }}-node-
# - name: Configure npm registry - name: Configure npm proxy
# run: | run: |
# npm config set registry https://registry.npmmirror.com if [ -n "$HTTP_PROXY" ]; then npm config set proxy "$HTTP_PROXY"; fi
# npm config set fetch-retries 5 if [ -n "$http_proxy" ]; then npm config set proxy "$http_proxy"; fi
# npm config set fetch-retry-mintimeout 20000 if [ -n "$HTTPS_PROXY" ]; then npm config set https-proxy "$HTTPS_PROXY"; fi
# npm config set fetch-retry-maxtimeout 120000 if [ -n "$https_proxy" ]; then npm config set https-proxy "$https_proxy"; fi
# npm config set audit false
# if [ -n "$HTTP_PROXY" ]; then npm config set proxy "$HTTP_PROXY"; fi - name: Show proxy status
# if [ -n "$HTTPS_PROXY" ]; then npm config set https-proxy "$HTTPS_PROXY"; fi run: |
if [ -n "$HTTP_PROXY" ] || [ -n "$http_proxy" ] || [ -n "$HTTPS_PROXY" ] || [ -n "$https_proxy" ]; then echo "proxy=on"; else echo "proxy=off"; fi
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci