File tree Expand file tree Collapse file tree 5 files changed +9
-55
lines changed Expand file tree Collapse file tree 5 files changed +9
-55
lines changed Original file line number Diff line number Diff line change @@ -16,57 +16,36 @@ permissions:
16
16
contents : read
17
17
18
18
jobs :
19
- get-go-version :
20
- runs-on : ubuntu-latest
21
- outputs :
22
- go-version : ${{ steps.get-go-version.outputs.go-version }}
23
- steps :
24
- - uses : actions/checkout@v5
25
- - name : ' Determine Go version'
26
- id : get-go-version
27
- run : |
28
- echo "Found Go $(cat .go-version)"
29
- echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
30
-
31
19
darwin-go-tests :
32
- needs :
33
- - get-go-version
34
20
runs-on : macos-latest
35
21
name : Darwin Go tests
36
22
steps :
37
23
- uses : actions/checkout@v5
38
24
- uses : actions/setup-go@v5
39
25
with :
40
- go-version : ${{ needs.get-go-version.outputs.go-version }}
26
+ go-version : stable
41
27
- run : |
42
- echo "Testing with Go ${{ needs.get-go-version.outputs.go-version }}"
43
28
go test -race -count 1 ./... -timeout=3m -v
44
29
45
30
windows-go-tests :
46
- needs :
47
- - get-go-version
48
31
runs-on : windows-latest
49
32
name : Windows Go tests
50
33
steps :
51
34
- uses : actions/checkout@v5
52
35
- uses : actions/setup-go@v5
53
36
with :
54
- go-version : ${{ needs.get-go-version.outputs.go-version }}
37
+ go-version : stable
55
38
# Running unit tests directly with `go test` due to gofmt/gofumpt issues in Windows
56
39
- run : |
57
- echo "Testing with Go ${{ needs.get-go-version.outputs.go-version }}"
58
40
go test -race -count 1 ./... -timeout=3m -v
59
41
60
42
linux-go-tests :
61
- needs :
62
- - get-go-version
63
43
runs-on : ubuntu-latest
64
44
name : Linux Go tests
65
45
steps :
66
46
- uses : actions/checkout@v5
67
47
- uses : actions/setup-go@v5
68
48
with :
69
- go-version : ${{ needs.get-go-version.outputs.go-version }}
49
+ go-version : stable
70
50
- run : |
71
- echo "Testing with Go ${{ needs.get-go-version.outputs.go-version }}"
72
51
make unit-test
Original file line number Diff line number Diff line change @@ -15,62 +15,43 @@ permissions:
15
15
contents : read
16
16
17
17
jobs :
18
- get-go-version :
19
- runs-on : ubuntu-latest
20
- outputs :
21
- go-version : ${{ steps.get-go-version.outputs.go-version }}
22
- steps :
23
- - uses : actions/checkout@v5
24
- - name : ' Determine Go version'
25
- id : get-go-version
26
- run : |
27
- echo "Found Go $(cat .go-version)"
28
- echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
29
18
check-mod-tidy :
30
- needs :
31
- - get-go-version
32
19
runs-on : ubuntu-latest
33
20
name : Go Mod Tidy
34
21
steps :
35
22
- uses : actions/checkout@v5
36
23
- uses : actions/setup-go@v5
37
24
with :
38
- go-version : ${{ needs.get-go-version.outputs.go-version }}
25
+ go-version : stable
39
26
- run : go mod tidy
40
27
check-lint :
41
- needs :
42
- - get-go-version
43
28
runs-on : ubuntu-latest
44
29
name : Lint check
45
30
steps :
46
31
- uses : actions/checkout@v5
47
32
- uses : actions/setup-go@v5
48
33
with :
49
- go-version : ${{ needs.get-go-version.outputs.go-version }}
34
+ go-version : stable
50
35
- uses : golangci/golangci-lint-action@v8
51
36
with :
52
37
only-new-issues : true
53
38
check-fmt :
54
- needs :
55
- - get-go-version
56
39
runs-on : ubuntu-latest
57
40
name : Gofmt check
58
41
steps :
59
42
- uses : actions/checkout@v5
60
43
- uses : actions/setup-go@v5
61
44
with :
62
- go-version : ${{ needs.get-go-version.outputs.go-version }}
45
+ go-version : stable
63
46
- run : make fmtcheck
64
47
check-generate :
65
- needs :
66
- - get-go-version
67
48
runs-on : ubuntu-latest
68
49
name : Generate check
69
50
steps :
70
51
- uses : actions/checkout@v5
71
52
- uses : actions/setup-go@v5
72
53
with :
73
- go-version : ${{ needs.get-go-version.outputs.go-version }}
54
+ go-version : stable
74
55
- run : |
75
56
export PATH=$PATH:$(go env GOPATH)/bin
76
57
make generate
Original file line number Diff line number Diff line change 22
22
- name : Set up Go
23
23
uses : actions/setup-go@v5
24
24
with :
25
- go-version : ${{ needs.get-go-version.outputs.go-version }}
25
+ go-version : stable
26
26
27
27
- name : Install go-junit-report
28
28
run : go install github.com/jstemmer/go-junit-report/v2@latest
33
33
34
34
- name : Run integration and unit tests
35
35
run : |
36
- echo "Testing with Go ${{ needs.get-go-version.outputs.go-version }}"
37
36
make test | go-junit-report -set-exit-code -iocopy -out "$REPORT_FILENAME"
38
37
env :
39
38
LINODE_TOKEN : ${{ secrets.LINODE_TOKEN }}
Original file line number Diff line number Diff line change @@ -20,15 +20,12 @@ jobs:
20
20
steps :
21
21
- name : Checkout
22
22
uses : actions/checkout@v5
23
- - name : Get Go version
24
- id : go-version
25
- run : echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
26
23
- name : Unshallow
27
24
run : git fetch --prune --unshallow
28
25
- name : Set up Go
29
26
uses : actions/setup-go@v5
30
27
with :
31
- go-version : ${{ steps.go-version.outputs.go-version }}
28
+ go-version : stable
32
29
- name : Describe plugin
33
30
id : plugin_describe
34
31
run : echo "api_version=$(go run . describe | jq -r '.api_version')" >> "$GITHUB_OUTPUT"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments