Skip to content

Commit

Permalink
up: fix test error on PR, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Oct 17, 2022
1 parent 4e3648c commit 1c3506b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
go_version: [1.17]

steps:
- name: Checkout
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 7 additions & 2 deletions repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 1c3506b

Please sign in to comment.