File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,17 +3,13 @@ name: CI
33on :
44 push :
55 pull_request :
6- workflow_dispatch :
76
87permissions :
98 contents : read
109
1110jobs :
1211 checks :
13- name : Go checks
1412 runs-on : ubuntu-latest
15- timeout-minutes : 15
16-
1713 steps :
1814 - name : Checkout
1915 uses : actions/checkout@v4
2420 go-version-file : go.mod
2521 cache : true
2622
27- - name : Show Go version
28- run : go version
29-
3023 - name : Run repo CI script
31- shell : bash
3224 run : bash scripts/ci.sh
25+
26+ # Even if the CI script fails, we still want go.sum for copy/paste.
27+ - name : Ensure go.sum exists (copy/paste helper)
28+ if : always()
29+ continue-on-error : true
30+ run : |
31+ # Attempt to build/test to force module resolution (best signal).
32+ go test ./... || true
33+ # Fallback: download module graph if go.sum still doesn't exist.
34+ if [ ! -f go.sum ]; then
35+ go mod download || true
36+ fi
37+
38+ - name : Print go.sum (copy/paste)
39+ if : always()
40+ run : |
41+ echo "GO_SUM_BEGIN"
42+ if [ -f go.sum ]; then
43+ cat go.sum
44+ else
45+ echo "(go.sum not present)"
46+ fi
47+ echo "GO_SUM_END"
48+
49+ - name : Upload go.sum artifact
50+ if : always()
51+ uses : actions/upload-artifact@v4
52+ with :
53+ name : go-sum
54+ path : go.sum
55+ if-no-files-found : warn
You can’t perform that action at this time.
0 commit comments