Go 1.22 (#122)
Update Go & Ubuntu versions in GitHub CI workflows. Pass files through a new version of gofmt. Allow running CI workflow manually.
This commit is contained in:

committed by
GitHub

parent
844d4b8a71
commit
5514912016
2
.github/test-coverage.sh
vendored
2
.github/test-coverage.sh
vendored
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
echo 'mode: count' > coverage.merged &&\
|
||||
go list -f '{{.Dir}}' ./... | xargs -n1 -I'{}' sh -c ': > coverage.tmp; go test -v -covermode=count -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> coverage.merged' &&\
|
||||
go list -f '{{.Dir}}' ./... | xargs -I'{}' sh -c ': > coverage.tmp; go test -v -covermode=count -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> coverage.merged' &&\
|
||||
rm coverage.tmp
|
||||
|
8
.github/workflows/build-and-test.yaml
vendored
8
.github/workflows/build-and-test.yaml
vendored
@@ -1,13 +1,13 @@
|
||||
name: build-and-test
|
||||
on: [pull_request, push]
|
||||
on: [pull_request, push, workflow_dispatch]
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
go-version: 1.22
|
||||
- run: DIFF="$( find . -name '*.go' -print0 | xargs -0 gofmt -l )"; if [ -n "$DIFF" ]; then echo "Files not formatted, run gofmt:"; echo "$DIFF"; exit 1; fi
|
||||
- run: sudo apt-get install libusb-1.0-0-dev
|
||||
- run: go install golang.org/x/tools/cmd/cover@latest
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
go-version: 1.22
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: |-
|
||||
|
Reference in New Issue
Block a user