diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2afaecff5..ae37945f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,8 +189,19 @@ jobs: node-version: "22" cache: "npm" - - name: Install dependencies - run: npm ci + - name: Install dependencies with retry + run: | + for attempt in 1 2 3; do + if npm ci; then + exit 0 + else + exit_code=$? + fi + if [ "$attempt" -eq 3 ]; then + exit $exit_code + fi + sleep $((attempt * 20)) + done - name: Install Playwright browsers timeout-minutes: 10 @@ -241,8 +252,19 @@ jobs: node-version: "22" cache: "npm" - - name: Install dependencies - run: npm ci + - name: Install dependencies with retry + run: | + for attempt in 1 2 3; do + if npm ci; then + exit 0 + else + exit_code=$? + fi + if [ "$attempt" -eq 3 ]; then + exit $exit_code + fi + sleep $((attempt * 20)) + done - name: Install Playwright browsers timeout-minutes: 10