@@ -22,35 +22,23 @@ jobs:
2222 steps :
2323 - uses : actions/checkout@v4
2424
25- # Debugging step for Linux/Mac
26- - name : Pre-Cleanup Directory Listing (Linux/Mac)
25+ # Directory Listing and Cleanup for Linux/Mac
26+ - name : Directory Listing and Cleanup (Linux/Mac)
2727 if : runner.os != 'Windows'
2828 run : |
2929 ls -la ~/go/pkg/mod || echo "Directory does not exist"
30+ rm -rf ~/.cache/go-build ~/go/pkg/mod || true
3031 shell : bash
3132
32- # Debugging step for Windows
33- - name : Pre-Cleanup Directory Listing (Windows)
33+ # Directory Listing and Cleanup for Windows
34+ - name : Directory Listing and Cleanup (Windows)
3435 if : runner.os == 'Windows'
3536 run : |
3637 if (Test-Path -Path "$env:USERPROFILE\go\pkg\mod") {
3738 Get-ChildItem -Force -Recurse "$env:USERPROFILE\go\pkg\mod"
3839 } else {
3940 Write-Output "Directory does not exist"
4041 }
41- shell : pwsh
42-
43- # Clean cache directories on Linux/Mac
44- - name : Clean Cache on Linux/Mac
45- if : runner.os != 'Windows'
46- run : |
47- rm -rf ~/.cache/go-build ~/go/pkg/mod
48- shell : bash
49-
50- # Clean cache directories on Windows
51- - name : Clean Cache on Windows
52- if : runner.os == 'Windows'
53- run : |
5442 if (Test-Path -Path "$env:USERPROFILE\.cache\go-build") {
5543 Remove-Item -Recurse -Force "$env:USERPROFILE\.cache\go-build"
5644 }
6957 key : go-mod-${{ matrix.os }}-${{ hashFiles('**/go.sum') }}
7058 restore-keys : |
7159 go-mod-${{ matrix.os }}-
60+ go-mod-
7261
7362 # Run tests
7463 - uses : ./.github/actions/test
0 commit comments