File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -180,12 +180,27 @@ jobs:
180180 #snapshot_source=$(./script/upgrades.sh snapshot-source ${{ github.ref }})
181181 echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV
182182 #echo "SNAPSHOT_SOURCE=$snapshot_source" >> $GITHUB_ENV
183+ - name : Fix Go module cache permissions
184+ if : env.TEST_REQUIRED != ''
185+ run : |
186+ # Fix permissions on Go module cache to prevent permission denied errors
187+ # This is needed because sudo cleanup may have affected cache permissions
188+ if [ -d "$HOME/go/pkg/mod" ]; then
189+ sudo chown -R $(id -u):$(id -g) "$HOME/go/pkg/mod" 2>/dev/null || true
190+ fi
191+ # Ensure Go cache directories exist with correct permissions
192+ mkdir -p "$HOME/go/pkg/mod/cache/download"
193+ chmod -R u+w "$HOME/go/pkg/mod" 2>/dev/null || true
183194 - name : run test
184195 id : test
185196 if : env.TEST_REQUIRED != ''
186197 env :
187198 TEST_CONFIG : test-config-gha.json
199+ GOMODCACHE : ${{ runner.temp }}/go-mod-cache
200+ GOCACHE : ${{ runner.temp }}/go-build-cache
188201 run : |
202+ # Ensure cache directories exist with correct permissions
203+ mkdir -p "$GOMODCACHE" "$GOCACHE"
189204 cd tests/upgrade
190205 make test
191206 - name : upload validator(s) stdout/stderr
You can’t perform that action at this time.
0 commit comments