diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0b3c49e..f696292 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] # Do not forget to bump every 6 months! - gover: ["1.16"] + gover: ["1.17"] runs-on: "${{matrix.os}}" name: "go${{matrix.gover}}.x on ${{matrix.os}}" steps: @@ -36,10 +36,6 @@ jobs: - name: Turn off git core.autocrlf run: git config --global core.autocrlf false - uses: actions/checkout@v2 - - name: 'go version' - run: go version - - name: 'go env' - run: go env - name: "Debug" run: | echo HOME = $HOME @@ -53,7 +49,7 @@ jobs: uses: actions/cache@v2 with: path: ~/go - key: "${{runner.os}}-gopkg-${{hashFiles('go.sum', '.github/workflows/*.yml')}}-v2" + key: "${{runner.os}}-gopkg-${{hashFiles('go.sum', '.github/workflows/*.yml')}}" # Fetch the tools before checking out, so they don't modify go.mod/go.sum. - name: 'go get necessary tools' @@ -148,9 +144,11 @@ jobs: run: rm coverage.txt # Don't run go test -race if anything failed, to speed up the results. - name: 'Check: go test -race' - run: go test -timeout=40s -race ./... + run: go test -timeout=60s -race ./... - name: 'Check: go test -bench .' run: go test -timeout=40s -bench . -benchtime=100ms -cpu=1 ./... + - name: 'Check: CGO_ENABLED=0 go test -short' + run: CGO_ENABLED=0 go test -timeout=40s -short ./... - name: "Check: tree is clean" run: | @@ -195,7 +193,8 @@ jobs: cd .. git clone https://github.com/periph/cmd cd cmd - go get periph.io/x/devices/v3@${GITHUB_SHA} + go mod edit -replace=periph.io/x/devices/v3=../devices + go get ./... go test -short ./... - name: 'Send comments' diff --git a/st7567/example_test.go b/st7567/example_test.go index aeb2d24..7a35b96 100644 --- a/st7567/example_test.go +++ b/st7567/example_test.go @@ -63,7 +63,7 @@ func Example() { }() //Control-C trap - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, syscall.SIGTERM) go func() { <-c