From 1ef2a9f48c502cee5c0377f51b82cbe995f6711a Mon Sep 17 00:00:00 2001 From: web3-bot Date: Tue, 23 Aug 2022 14:26:53 +0000 Subject: [PATCH 1/4] bump go.mod to Go 1.18 and run go fix --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0b819c5..8c086e4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ipfs/go-path -go 1.17 +go 1.18 require ( github.com/ipfs/go-block-format v0.0.3 From fcbb65f0e848a851ed9a888dec6784ea1bad7bcf Mon Sep 17 00:00:00 2001 From: web3-bot Date: Tue, 23 Aug 2022 14:26:53 +0000 Subject: [PATCH 2/4] run gofmt -s --- path.go | 8 ++++---- resolver/resolver.go | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/path.go b/path.go index f49dde1..e70d963 100644 --- a/path.go +++ b/path.go @@ -10,10 +10,10 @@ import ( ) // A Path represents an ipfs content path: -// * /path/to/file -// * /ipfs/ -// * /ipns//path/to/folder -// * etc +// - /path/to/file +// - /ipfs/ +// - /ipns//path/to/folder +// - etc type Path string // ^^^ diff --git a/resolver/resolver.go b/resolver/resolver.go index ba7e1a2..74c5b27 100644 --- a/resolver/resolver.go +++ b/resolver/resolver.go @@ -63,7 +63,8 @@ type Resolver interface { // basicResolver implements the Resolver interface. // It references a FetcherFactory, which is uses to resolve nodes. // TODO: now that this is more modular, try to unify this code with the -// the resolvers in namesys. +// +// the resolvers in namesys. type basicResolver struct { FetcherFactory fetcher.Factory } From 2c5a14f6b950f0f6e45d1a6e941f22f0be2c7bc9 Mon Sep 17 00:00:00 2001 From: web3-bot Date: Tue, 23 Aug 2022 14:26:54 +0000 Subject: [PATCH 3/4] update .github/workflows/go-test.yml --- .github/workflows/go-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index b86241a..8a1697b 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -10,16 +10,16 @@ jobs: fail-fast: false matrix: os: [ "ubuntu", "windows", "macos" ] - go: [ "1.17.x", "1.18.x" ] + go: [ "1.18.x", "1.19.x" ] env: COVERAGES: "" runs-on: ${{ format('{0}-latest', matrix.os) }} name: ${{ matrix.os }} (go ${{ matrix.go }}) steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: Go information @@ -43,7 +43,7 @@ jobs: # Use -coverpkg=./..., so that we include cross-package coverage. # If package ./A imports ./B, and ./A's tests also cover ./B, # this means ./B's coverage will be significantly higher than 0%. - run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./... + run: go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./... - name: Run tests (32 bit) if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX. uses: protocol/multiple-go-modules@v1.2 @@ -52,7 +52,7 @@ jobs: with: run: | export "PATH=${{ env.PATH_386 }}:$PATH" - go test -v ./... + go test -v -shuffle=on ./... - name: Run tests with race detector if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow uses: protocol/multiple-go-modules@v1.2 @@ -62,7 +62,7 @@ jobs: shell: bash run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV - name: Upload coverage to Codecov - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 + uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0 with: files: '${{ env.COVERAGES }}' env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }} From 26bc17e523d23c58c589edd60917244b7634bd6f Mon Sep 17 00:00:00 2001 From: web3-bot Date: Tue, 23 Aug 2022 14:26:54 +0000 Subject: [PATCH 4/4] update .github/workflows/go-check.yml --- .github/workflows/go-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml index 25e1afd..251f7fa 100644 --- a/.github/workflows/go-check.yml +++ b/.github/workflows/go-check.yml @@ -11,12 +11,12 @@ jobs: env: RUNGOGENERATE: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: - go-version: "1.18.x" + go-version: "1.19.x" - name: Run repo-specific setup uses: ./.github/actions/go-check-setup if: hashFiles('./.github/actions/go-check-setup') != '' @@ -27,7 +27,7 @@ jobs: echo "RUNGOGENERATE=true" >> $GITHUB_ENV fi - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@d7e217c1ff411395475b2971c0824e1e7cc1af98 # 2022.1 (v0.3.0) + run: go install honnef.co/go/tools/cmd/staticcheck@376210a89477dedbe6fdc4484b233998650d7b3c # 2022.1.3 (v0.3.3) - name: Check that go.mod is tidy uses: protocol/multiple-go-modules@v1.2 with: