We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1079281 commit 7138118Copy full SHA for 7138118
.github/workflows/ci.yml
@@ -45,7 +45,20 @@ jobs:
45
${{ runner.os }}-cargo-
46
47
- name: Run tests
48
- run: make test
+ run: |
49
+ # First attempt
50
+ if ! make test; then
51
+ # Check if the error matches the pattern indicating a cache issue
52
+ if [[ $? -eq 2 ]] && [[ $(cat /tmp/test_output 2>&1) =~ "unknown revision" ]]; then
53
+ echo "Tests failed with cache-related error. Cleaning Go cache and retrying..."
54
+ go clean -cache -modcache
55
+ # Second attempt after cleaning cache
56
+ make test
57
+ else
58
+ # If it failed for a different reason, exit with the original error
59
+ exit 1
60
+ fi
61
62
env:
63
TARGETPLATFORM: linux/amd64
64
0 commit comments