diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml index 6864d5add..cc65ce68a 100644 --- a/.github/workflows/go-check.yml +++ b/.github/workflows/go-check.yml @@ -13,10 +13,10 @@ jobs: with: submodules: recursive - id: config - uses: protocol/.github/.github/actions/read-config@next + uses: protocol/.github/.github/actions/read-config@master - uses: actions/setup-go@v3 with: - go-version: "1.19.x" + go-version: 1.20.x - name: Run repo-specific setup uses: ./.github/actions/go-check-setup if: hashFiles('./.github/actions/go-check-setup') != '' @@ -33,7 +33,7 @@ jobs: fi git diff --exit-code -- go.sum go.mod - name: gofmt - if: ${{ success() || failure() }} # run this step even if the previous one failed + if: success() || failure() # run this step even if the previous one failed run: | out=$(gofmt -s -l .) if [[ -n "$out" ]]; then @@ -41,12 +41,12 @@ jobs: exit 1 fi - name: go vet - if: ${{ success() || failure() }} # run this step even if the previous one failed + if: success() || failure() # run this step even if the previous one failed uses: protocol/multiple-go-modules@v1.2 with: run: go vet ./... - name: staticcheck - if: ${{ success() || failure() }} # run this step even if the previous one failed + if: success() || failure() # run this step even if the previous one failed uses: protocol/multiple-go-modules@v1.2 with: run: | diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index ec54418eb..c5cb3efc7 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: os: [ "ubuntu", "windows", "macos" ] - go: [ "1.18.x", "1.19.x" ] + go: ["1.19.x","1.20.x"] env: COVERAGES: "" runs-on: ${{ fromJSON(vars[format('UCI_GO_TEST_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }} @@ -20,7 +20,7 @@ jobs: with: submodules: recursive - id: config - uses: protocol/.github/.github/actions/read-config@next + uses: protocol/.github/.github/actions/read-config@master - uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} @@ -29,7 +29,7 @@ jobs: go version go env - name: Use msys2 on windows - if: ${{ matrix.os == 'windows' }} + if: matrix.os == 'windows' shell: bash # The executable for msys2 is also called bash.cmd # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#shells @@ -57,7 +57,7 @@ jobs: GOARCH: 386 with: run: | - export "PATH=${{ env.PATH_386 }}:$PATH" + export "PATH=$PATH_386:$PATH" go test -v -shuffle=on ./... - name: Run tests with race detector # speed things up. Windows and OSX VMs are slow diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml index d585d7974..e2408e37c 100644 --- a/.github/workflows/release-check.yml +++ b/.github/workflows/release-check.yml @@ -9,3 +9,5 @@ on: jobs: release-check: uses: protocol/.github/.github/workflows/release-check.yml@master + with: + go-version: 1.20.x diff --git a/fsutil/disk/usage_openbsd.go b/fsutil/disk/usage_openbsd.go index 7f80b6154..17565c3e3 100644 --- a/fsutil/disk/usage_openbsd.go +++ b/fsutil/disk/usage_openbsd.go @@ -1,9 +1,10 @@ //go:build openbsd -// +build openbsd package disk import ( + "syscall" + "golang.org/x/sys/unix" ) diff --git a/fsutil/disk/usage_unix.go b/fsutil/disk/usage_unix.go index 75d0420ce..593b3921a 100644 --- a/fsutil/disk/usage_unix.go +++ b/fsutil/disk/usage_unix.go @@ -1,5 +1,4 @@ //go:build freebsd || linux || darwin || (aix && !cgo) -// +build freebsd linux darwin aix,!cgo package disk diff --git a/go.mod b/go.mod index d7626a3da..3d5817ca4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ipni/storetheindex -go 1.18 +go 1.19 require ( contrib.go.opencensus.io/exporter/prometheus v0.4.0 diff --git a/internal/libp2pserver/server.go b/internal/libp2pserver/server.go index 783bf3f18..23ffff0bd 100644 --- a/internal/libp2pserver/server.go +++ b/internal/libp2pserver/server.go @@ -9,7 +9,7 @@ import ( "time" logging "github.com/ipfs/go-log/v2" - "github.com/ipni/storetheindex/api/v0" + v0 "github.com/ipni/storetheindex/api/v0" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/peer"