Skip to content

Commit 4ece696

Browse files
claudemldangelo
andcommitted
fix: add retry with longer timeout for slow npm installs
The first `npx promptfoo@latest` invocation can take 1-2 minutes as npm downloads and installs the full promptfoo package with all dependencies. This is expected behavior, not a failure. Adding retry with 5-minute timeout prevents false failures from slow npm registry downloads and allows sufficient time for package installation. Co-Authored-By: Michael D'Angelo <michael@promptfoo.dev> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 8871443 commit 4ece696

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ jobs:
8787
run: uv sync
8888

8989
- name: Test CLI can be invoked
90-
run: uv run promptfoo --version
90+
uses: nick-fields/retry@v3
91+
with:
92+
timeout_minutes: 5
93+
max_attempts: 2
94+
retry_on: error
95+
command: uv run promptfoo --version
9196

9297
- name: Test Node.js detection
9398
run: uv run python -c "from promptfoo.cli import check_node_installed, check_npx_installed; assert check_node_installed(); assert check_npx_installed()"

0 commit comments

Comments
 (0)