diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c7e45f..e447ad6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,6 @@ jobs: timeout-minutes: 5 strategy: fail-fast: true - matrix: - go_version: [1.17] steps: - name: Checkout @@ -25,7 +23,7 @@ jobs: uses: WillAbides/setup-go-faster@v1.7.0 timeout-minutes: 3 with: - go-version: ${{ matrix.go_version }} + go-version: 1.18 - name: Setup ENV # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable diff --git a/README.md b/README.md index 3e6969d..d77d967 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gookit/gitw?style=flat-square) [![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/gookit/gitw)](https://github.com/gookit/gitw) -[![GoDoc](https://godoc.org/github.com/gookit/gitw?status.svg)](https://pkg.go.dev/github.com/gookit/gitw) +[![Go Reference](https://pkg.go.dev/badge/github.com/gookit/goutil.svg)](https://pkg.go.dev/github.com/gookit/goutil) [![Go Report Card](https://goreportcard.com/badge/github.com/gookit/gitw)](https://goreportcard.com/report/github.com/gookit/gitw) [![Unit-Tests](https://github.com/gookit/gitw/workflows/Unit-Tests/badge.svg)](https://github.com/gookit/gitw/actions) [![Coverage Status](https://coveralls.io/repos/github/gookit/gitw/badge.svg?branch=master)](https://coveralls.io/github/gookit/gitw?branch=master) @@ -22,7 +22,7 @@ ## Install -> required: go 1.14+, git 2.x +> required: go 1.16+, git 2.x ```bash go get github.com/gookit/gitw diff --git a/README.zh-CN.md b/README.zh-CN.md index 5950b81..e6d7ba3 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -2,7 +2,7 @@ ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gookit/gitw?style=flat-square) [![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/gookit/gitw)](https://github.com/gookit/gitw) -[![GoDoc](https://godoc.org/github.com/gookit/gitw?status.svg)](https://pkg.go.dev/github.com/gookit/gitw) +[![Go Reference](https://pkg.go.dev/badge/github.com/gookit/goutil.svg)](https://pkg.go.dev/github.com/gookit/goutil) [![Go Report Card](https://goreportcard.com/badge/github.com/gookit/gitw)](https://goreportcard.com/report/github.com/gookit/gitw) [![Unit-Tests](https://github.com/gookit/gitw/workflows/Unit-Tests/badge.svg)](https://github.com/gookit/gitw/actions) [![Coverage Status](https://coveralls.io/repos/github/gookit/gitw/badge.svg?branch=master)](https://coveralls.io/github/gookit/gitw?branch=master) diff --git a/repo_test.go b/repo_test.go index bc75913..881ec60 100644 --- a/repo_test.go +++ b/repo_test.go @@ -61,8 +61,13 @@ func TestRepo_BranchInfos(t *testing.T) { cur := repo.CurBranchInfo() if cur != nil { assert.NotEmpty(t, cur) - assert.Equal(t, "main", cur.Name) - assert.NotEmpty(t, repo.BranchInfo("main")) + assert.NotEmpty(t, cur.Name) + } + + mbr := repo.BranchInfo("main") + if mbr != nil { + assert.Equal(t, "main", mbr.Name) + assert.Equal(t, "main", mbr.Short) } }