From e2270fe1db516b74d24d8e9613bcf21573175b7b Mon Sep 17 00:00:00 2001 From: web3-bot Date: Wed, 24 Aug 2022 11:51:00 +0000 Subject: [PATCH 1/5] bump go.mod to Go 1.18 and run go fix --- gen.go | 1 - go.mod | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gen.go b/gen.go index 1995389..dcd4483 100644 --- a/gen.go +++ b/gen.go @@ -1,5 +1,4 @@ //go:build ignore -// +build ignore package main diff --git a/go.mod b/go.mod index 721f4d7..6683886 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/multiformats/go-multicodec -go 1.17 +go 1.18 From 2429bad93fe6ef9bb70e9b7c9ed37c098925ef09 Mon Sep 17 00:00:00 2001 From: web3-bot Date: Wed, 24 Aug 2022 11:51:00 +0000 Subject: [PATCH 2/5] 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 9a59ba920a8b1ecab932f0e0edeb6dd610c5a506 Mon Sep 17 00:00:00 2001 From: web3-bot Date: Wed, 24 Aug 2022 11:51:00 +0000 Subject: [PATCH 3/5] 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: From 68ba0250ddf71453aaf0db58c5feb85eb8ac24e2 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 24 Aug 2022 13:43:51 +1000 Subject: [PATCH 4/5] fix: replace io/ioutil with io --- code_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code_test.go b/code_test.go index e0d59c1..999a34c 100644 --- a/code_test.go +++ b/code_test.go @@ -3,7 +3,7 @@ package multicodec_test import ( "flag" "fmt" - "io/ioutil" + "io" "strings" "testing" @@ -70,7 +70,7 @@ func TestFlagValue(t *testing.T) { t.Parallel() fs := flag.NewFlagSet("", flag.ContinueOnError) - fs.SetOutput(ioutil.Discard) + fs.SetOutput(io.Discard) var code multicodec.Code fs.Var(&code, "multicodec", "") From a5c7ee1a6dd3048ad521c15fcfec4acb9c176b43 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 24 Aug 2022 13:44:36 +1000 Subject: [PATCH 5/5] chore: version bump 0.6.0 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index fc15ae0..42c14d1 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.5.0" + "version": "v0.6.0" }