From f51fe103056636b629af15c447e51e20e4efdcb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 12:08:03 +0000 Subject: [PATCH 1/9] Bump actions/setup-go from 3 to 4 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3501b2..ae2db56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} From f54f5eb09cdd9eada8a9917fe536e044d4c23a37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:05:15 +0000 Subject: [PATCH 2/9] Bump github.com/frankban/quicktest from 1.14.4 to 1.14.5 Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.14.4 to 1.14.5. - [Release notes](https://github.com/frankban/quicktest/releases) - [Commits](https://github.com/frankban/quicktest/compare/v1.14.4...v1.14.5) --- updated-dependencies: - dependency-name: github.com/frankban/quicktest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 231f764..6319b6f 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/spf13/cast go 1.18 -require github.com/frankban/quicktest v1.14.4 +require github.com/frankban/quicktest v1.14.5 require ( github.com/google/go-cmp v0.5.9 // indirect diff --git a/go.sum b/go.sum index 80fb7de..7632fe9 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA= +github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= From c49a664d4bcb3fb4d771565b836e205609b14e18 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 4 Aug 2023 11:08:11 +0200 Subject: [PATCH 3/9] ci: rename ci.yml to ci.yaml Signed-off-by: Mark Sagi-Kazar --- .github/workflows/{ci.yml => ci.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ci.yml => ci.yaml} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yaml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/ci.yaml From 9c5e91d8042c506f0af7b62e9272d1ff699f55d6 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 4 Aug 2023 11:09:44 +0200 Subject: [PATCH 4/9] docs: update badges Signed-off-by: Mark Sagi-Kazar --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58141f0..0e9e145 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # cast -[![Build Status](https://github.com/spf13/cast/actions/workflows/ci.yml/badge.svg)](https://github.com/spf13/cast/actions/workflows/ci.yml) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/cast/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/cast/actions/workflows/ci.yaml) [![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/cast)](https://pkg.go.dev/mod/github.com/spf13/cast) ![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast)](https://goreportcard.com/report/github.com/spf13/cast) +[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cast?style=flat-square)](https://goreportcard.com/report/github.com/spf13/cast) Easy and safe casting from one type to another in Go From a441ac7fbeff168d44482441383651d69e470195 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 4 Aug 2023 11:13:03 +0200 Subject: [PATCH 5/9] ci: pin actions versions, fix checkout order Signed-off-by: Mark Sagi-Kazar --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ae2db56..c2ebfd7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,14 +2,14 @@ name: CI on: push: - branches: - - master + branches: [master] pull_request: jobs: build: name: Build runs-on: ${{ matrix.os }} + strategy: # Fail fast is disabled because there are Go version specific features and tests # that should be able to fail independently. @@ -19,14 +19,14 @@ jobs: go-version: ['1.16', '1.17', '1.18', '1.19', '1.20'] steps: + - name: Checkout repository + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ matrix.go }} - - name: Checkout code - uses: actions/checkout@v3 - - name: Build run: go build -v ./... From 9d37e3a907a640b82bdc982a6552dcf75585ec9d Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 4 Aug 2023 11:13:12 +0200 Subject: [PATCH 6/9] ci: fix dependabot config Signed-off-by: Mark Sagi-Kazar --- .github/dependabot.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 5153b81..73aa36f 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -3,14 +3,10 @@ version: 2 updates: - package-ecosystem: gomod directory: / - labels: - - dependencies schedule: interval: daily - package-ecosystem: github-actions directory: / - labels: - - dependencies schedule: interval: daily From 268227c9f7c9caa4c227c4001aaffbd14523b490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 28 Nov 2023 10:47:19 +0100 Subject: [PATCH 7/9] github: Replace the test workflow with the one used in Afero Which is updated. --- .github/workflows/ci.yaml | 34 --------------------------------- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index c2ebfd7..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: CI - -on: - push: - branches: [master] - pull_request: - -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - - strategy: - # Fail fast is disabled because there are Go version specific features and tests - # that should be able to fail independently. - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - go-version: ['1.16', '1.17', '1.18', '1.19', '1.20'] - - steps: - - name: Checkout repository - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - - name: Set up Go - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 - with: - go-version: ${{ matrix.go }} - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -race -v ./... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1755fb8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +on: + push: + branches: [main] + pull_request: +name: Test +permissions: + contents: read +jobs: + test: + strategy: + matrix: + go-version: [1.19.x, 1.20.x, 1.21.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + - name: Install staticcheck + if: matrix.go-version == '1.21.x' + run: go install honnef.co/go/tools/cmd/staticcheck@latest + shell: bash + - name: Update PATH + run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + shell: bash + - name: Checkout code + uses: actions/checkout@v3 + - name: Fmt + if: matrix.platform != 'windows-latest' # :( + run: "diff <(gofmt -d .) <(printf '')" + shell: bash + - name: Vet + run: go vet ./... + - name: Staticcheck + if: matrix.go-version == '1.21.x' + run: staticcheck ./... + - name: Test + run: go test -race ./... From b09a6f848f3307169a850e0e7aba3f8d8f968f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 28 Nov 2023 10:48:15 +0100 Subject: [PATCH 8/9] deps: update to github.com/frankban/quicktest v1.14.6 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6319b6f..c5be5ea 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/spf13/cast go 1.18 -require github.com/frankban/quicktest v1.14.5 +require github.com/frankban/quicktest v1.14.6 require ( github.com/google/go-cmp v0.5.9 // indirect diff --git a/go.sum b/go.sum index 7632fe9..ab408ab 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA= -github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= From 48ddde5701366ade1d3aba346e09bb58430d37c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 28 Nov 2023 10:48:54 +0100 Subject: [PATCH 9/9] Bump Go version in go.mod to 1.19 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c5be5ea..96d32f2 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/spf13/cast -go 1.18 +go 1.19 require github.com/frankban/quicktest v1.14.6