Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 88942b5

Browse files
committed
github action: update for go1.17
- Use go1.17 for github actions. - Remove 'go version' and 'go env' since they are already run as part of setup-go@v2. - Run gofmt to add the go:build lines. - Fix a new check in go vet.
1 parent f3cf24a commit 88942b5

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
os: [ubuntu-latest, macos-latest, windows-latest]
2626
# Do not forget to bump every 6 months!
27-
gover: ["1.16"]
27+
gover: ["1.17"]
2828
runs-on: "${{matrix.os}}"
2929
name: "go${{matrix.gover}}.x on ${{matrix.os}}"
3030
steps:
@@ -36,10 +36,6 @@ jobs:
3636
- name: Turn off git core.autocrlf
3737
run: git config --global core.autocrlf false
3838
- uses: actions/checkout@v2
39-
- name: 'go version'
40-
run: go version
41-
- name: 'go env'
42-
run: go env
4339
- name: "Debug"
4440
run: |
4541
echo HOME = $HOME
@@ -161,9 +157,11 @@ jobs:
161157
run: rm coverage.txt
162158
# Don't run go test -race if anything failed, to speed up the results.
163159
- name: 'Check: go test -race'
164-
run: go test -timeout=40s -race ./...
160+
run: go test -timeout=60s -race ./...
165161
- name: 'Check: go test -bench .'
166162
run: go test -timeout=40s -bench . -benchtime=100ms -cpu=1 ./...
163+
- name: 'Check: CGO_ENABLED=0 go test -short'
164+
run: CGO_ENABLED=0 go test -timeout=40s -short ./...
167165

168166
- name: "Check: tree is clean"
169167
run: |

cmd/periphhome/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
func autoCancellingContext(cfg string) (context.Context, func(), error) {
2929
// Cancel on SIGTERM / SIGINT.
3030
ctx, cancel := context.WithCancel(context.Background())
31-
chanSignal := make(chan os.Signal)
31+
chanSignal := make(chan os.Signal, 1)
3232
go func() {
3333
<-chanSignal
3434
cancel()

thirdparty/update.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed under the Apache License, Version 2.0
33
// that can be found in the LICENSE file.
44

5+
//go:build ignored
56
// +build ignored
67

78
package main

0 commit comments

Comments
 (0)