Skip to content

Commit 00f9613

Browse files
authored
Update ci.yml
1 parent 19ffc8a commit 00f9613

1 file changed

Lines changed: 31 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ name: CI
33
on:
44
push:
55
pull_request:
6-
workflow_dispatch:
76

87
permissions:
98
contents: read
109

1110
jobs:
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
@@ -24,9 +20,36 @@ jobs:
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

0 commit comments

Comments
 (0)