CI: sequence actions/checkout before actions/setup-go #4473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Reorders GitHub workflows using actions/checkout and actions/setup-go: run actions/checkout before actions/setup-go.
Running actions/checkout first checks out the go.sum file so the cache can hit. This matches the step-order demonstrated in the setup-go README:1
Motivation
The actions/setup-go build cache always misses because go.sum isn't present when the step runs. Here's the warning message and some timing notes 2
Validation
The first time this updated workflow runs (against this PR!) the setup-go step will still cache-miss, but it shouldn't emit the "Dependencies file is not found" log — the cache is just empty!
Subsequent runs should realize the speedup.
Footnotes
https://github.com/actions/setup-go?tab=readme-ov-file#basic ↩
https://github.com/prebid/prebid-server/actions/runs/16729524538/job/47353933940#step:2:16 ↩