Skip to content

Commit 454c05a

Browse files
claudemldangelo
andcommitted
fix: clean npm cache on Windows to prevent corruption
Windows GitHub Actions runners sometimes have corrupted npm caches that cause ECOMPROMISED errors. Clean the cache before running tests to prevent these failures. Co-Authored-By: Michael D'Angelo <michael@promptfoo.dev>
1 parent 4ece696 commit 454c05a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ jobs:
8686
- name: Install package
8787
run: uv sync
8888

89+
- name: Clear npm cache on Windows
90+
if: runner.os == 'Windows'
91+
run: npm cache clean --force
92+
continue-on-error: true
93+
8994
- name: Test CLI can be invoked
9095
uses: nick-fields/retry@v3
9196
with:

0 commit comments

Comments
 (0)