diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc4ffa70..6d584396 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,18 @@ jobs: node-version: 22 - name: Install dependencies - run: npm install + shell: bash + run: | + for attempt in 1 2 3; do + npm install && break + if [ "$attempt" -lt 3 ]; then + echo "::warning::npm install attempt $attempt failed, retrying in 15s..." + sleep 15 + else + echo "::error::npm install failed after 3 attempts" + exit 1 + fi + done - name: Run Biome run: npx @biomejs/biome check src/ tests/ @@ -46,7 +57,18 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies - run: npm install + shell: bash + run: | + for attempt in 1 2 3; do + npm install && break + if [ "$attempt" -lt 3 ]; then + echo "::warning::npm install attempt $attempt failed, retrying in 15s..." + sleep 15 + else + echo "::error::npm install failed after 3 attempts" + exit 1 + fi + done - name: Run tests run: npm test diff --git a/.github/workflows/codegraph-impact.yml b/.github/workflows/codegraph-impact.yml index f60b6e38..a9edebd3 100644 --- a/.github/workflows/codegraph-impact.yml +++ b/.github/workflows/codegraph-impact.yml @@ -10,7 +10,19 @@ jobs: - uses: actions/setup-node@v6 with: node-version: '22' - - run: npm install + - name: Install dependencies + shell: bash + run: | + for attempt in 1 2 3; do + npm install && break + if [ "$attempt" -lt 3 ]; then + echo "::warning::npm install attempt $attempt failed, retrying in 15s..." + sleep 15 + else + echo "::error::npm install failed after 3 attempts" + exit 1 + fi + done - uses: actions/cache@v5 with: path: .codegraph/ diff --git a/.github/workflows/shield-license-compliance.yml b/.github/workflows/shield-license-compliance.yml index 16cb1647..60f5b164 100644 --- a/.github/workflows/shield-license-compliance.yml +++ b/.github/workflows/shield-license-compliance.yml @@ -29,7 +29,18 @@ jobs: cache: "npm" - name: Install dependencies - run: npm ci --prefer-offline --no-audit --no-fund + shell: bash + run: | + for attempt in 1 2 3; do + npm ci --prefer-offline --no-audit --no-fund --ignore-scripts && break + if [ "$attempt" -lt 3 ]; then + echo "::warning::npm ci attempt $attempt failed, retrying in 15s..." + sleep 15 + else + echo "::error::npm ci failed after 3 attempts" + exit 1 + fi + done - name: Create reports directory run: mkdir -p license-reports