FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(ci): clear test cache on master for fresh test runs (#20287) · stackrox/stackrox@d47c68f · GitHub

Commit d47c68f

Browse files
andauthored
feat(ci): clear test cache on master for fresh test runs (#20287)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f038be9 commit d47c68f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/actions/cache-go-dependencies/action.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ runs:
7272
after=$(du -sm "$gocache" 2>/dev/null | cut -f1);
7373
echo "GOCACHE trimmed: ${before:-0}MB -> ${after:-0}MB (removed $((${before:-0} - ${after:-0}))MB)"
7474
75+
- name: Clear test cache on non-PR runs
76+
if: github.event_name != 'pull_request'
77+
run: |
78+
# Non-PR runs (master, release branches, nightlies) always run tests
79+
# from scratch to catch real failures. go clean -testcache removes
80+
# cached test results while preserving the compilation cache.
81+
go clean -testcache
82+
echo "Cleared test cache for fresh run"
83+
shell: bash
84+
7585
- name: Stabilize file mtimes for Go test cache
7686
run: |
7787
# Go's test cache validates inputs by (path, size, mtime) — NOT content.

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL