Skip to content

Commit de3c7a6

Browse files
committed
Fix CI retry loop off-by-one and add retry.ts to path triggers
Skip sleep/warning on final attempt — no retry follows. Also add src/core/retry.ts to workflow path triggers since retry behavior directly affects tool installs.
1 parent da834b8 commit de3c7a6

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/test-install.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ on:
1111
paths:
1212
- "src/tools/**"
1313
- "src/core/download.ts"
14+
- "src/core/retry.ts"
1415
- ".github/workflows/test-install.yml"
1516
pull_request:
1617
paths:
1718
- "src/tools/**"
1819
- "src/core/download.ts"
20+
- "src/core/retry.ts"
1921
- ".github/workflows/test-install.yml"
2022
schedule:
2123
# Weekly Monday 9am UTC — detect upstream CDN/API breakage
@@ -46,8 +48,10 @@ jobs:
4648
if quarto install tinytex; then
4749
exit 0
4850
fi
49-
echo "::warning::Attempt $attempt failed, retrying in 15s..."
50-
sleep 15
51+
if [ "$attempt" -lt 3 ]; then
52+
echo "::warning::Attempt $attempt failed, retrying in 15s..."
53+
sleep 15
54+
fi
5155
done
5256
echo "::error::TinyTeX install failed after 3 attempts"
5357
exit 1
@@ -58,8 +62,10 @@ jobs:
5862
if quarto install chrome-headless-shell --no-prompt; then
5963
exit 0
6064
fi
61-
echo "::warning::Attempt $attempt failed, retrying in 15s..."
62-
sleep 15
65+
if [ "$attempt" -lt 3 ]; then
66+
echo "::warning::Attempt $attempt failed, retrying in 15s..."
67+
sleep 15
68+
fi
6369
done
6470
echo "::error::Chrome Headless Shell install failed after 3 attempts"
6571
exit 1

0 commit comments

Comments
 (0)