Skip to content

Commit bbcaad3

Browse files
author
OpenClaw
committed
ci: update go.yml workflow to modern version
1 parent 22f28e4 commit bbcaad3

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

.github/workflows/go.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
name: Go
2-
on: [push]
3-
jobs:
2+
on: [push, pull_request]
43

4+
jobs:
55
build:
66
name: Build
77
runs-on: ubuntu-latest
88
steps:
9+
- name: Check out code
10+
uses: actions/checkout@v4
911

10-
- name: Set up Go 1.12
11-
uses: actions/setup-go@v1
12+
- name: Set up Go
13+
uses: actions/setup-go@v5
1214
with:
13-
go-version: 1.12
14-
id: go
15-
16-
- name: Check out code into the Go module directory
17-
uses: actions/checkout@v1
15+
go-version: '1.21'
16+
cache: true
1817

1918
- name: Get dependencies
20-
run: |
21-
go get -v -t -d ./...
22-
if [ -f Gopkg.toml ]; then
23-
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
24-
dep ensure
25-
fi
19+
run: go mod download
2620

2721
- name: Build
28-
run: go build -v .
22+
run: go build -v ./...
23+
24+
- name: Test
25+
run: go test -v -race ./...

0 commit comments

Comments
 (0)