Skip to content

Commit

Permalink
add zsh to ci, consolidate macos versions, remove neko package (#305)
Browse files Browse the repository at this point in the history
* consolidate matrix, add zsh

* remove neko lib
  • Loading branch information
nonrational authored Feb 13, 2022
1 parent 4d70677 commit 2e8b93f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, macos-11.0, ubuntu-latest]
os: [macos-latest, ubuntu-latest]
go-version: [1.17.6]
shell: [/bin/bash, /bin/zsh]

name: ${{ matrix.os }} / go-${{ matrix.go-version }}
name: ${{ matrix.os }} / go-${{ matrix.go-version }} / ${{ matrix.shell }}
steps:
- uses: actions/setup-go@v1
with:
Expand All @@ -30,6 +31,9 @@ jobs:

- uses: actions/checkout@v2

- if: contains(matrix.os, 'ubuntu')
run: sudo apt install zsh

- if: contains(matrix.os, 'macos')
run: |
sw_vers
Expand All @@ -40,6 +44,8 @@ jobs:
- run: go mod download

- run: go test -v -race -coverprofile=coverage.out -covermode=atomic -timeout=300s ./...
env:
SHELL: ${{ matrix.shell }}

devel-release:
runs-on: macos-latest
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ go 1.13
require (
github.com/avast/retry-go v2.5.0+incompatible
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsevents v0.1.1
github.com/fsnotify/fsnotify v1.4.9
github.com/hashicorp/golang-lru v0.5.4
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/miekg/dns v1.1.29
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/vektra/errors v0.0.0-20140903201135-c64d83aba85a
github.com/vektra/neko v0.0.0-20141017182438-843f5ecf6932
golang.org/x/crypto v0.0.0-20200403201458-baeed622b8d8 // indirect
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d // indirect
Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@ github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/vektra/errors v0.0.0-20140903201135-c64d83aba85a h1:lUVfiMMY/te9icPKBqOKkBIMZNxSpM90dxokDeCcfBg=
github.com/vektra/errors v0.0.0-20140903201135-c64d83aba85a/go.mod h1:KUxJS71XlMs+ztT+RzsLRoWUQRUpECo/+Rb0EBk8/Wc=
github.com/vektra/neko v0.0.0-20141017182438-843f5ecf6932 h1:SslNPzxMsvmq9d29joAV87uY34VPgN0W9CDIcztcipg=
github.com/vektra/neko v0.0.0-20141017182438-843f5ecf6932/go.mod h1:7tfPLehrsToaevw9Vi9iL6FOslcBJ/uqYQc8y3YIbdI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200403201458-baeed622b8d8 h1:fpnn/HnJONpIu6hkXi1u/7rR0NzilgWr4T0JmWkEitk=
Expand Down
13 changes: 4 additions & 9 deletions linebuffer/linebuffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,23 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/vektra/neko"
)

func TestLineBuffer(t *testing.T) {
n := neko.Start(t)

n.It("appends lines to the buffer", func() {
t.Run("appends lines to the buffer", func(t *testing.T) {
var lb LineBuffer

lb.Append("hello")

var buf bytes.Buffer

n, err := lb.WriteTo(&buf)
require.NoError(t, err)
assert.NoError(t, err)

assert.Equal(t, int64(5), n)
})

n.It("wraps around automatically", func() {
t.Run("wraps around automatically", func(t *testing.T) {
var lb LineBuffer

lb.Size = 3
Expand All @@ -49,7 +45,7 @@ func TestLineBuffer(t *testing.T) {
assert.Equal(t, "hello4", lines[2])
})

n.It("wraps around automatically multiple times", func() {
t.Run("wraps around automatically multiple times", func(t *testing.T) {
var lb LineBuffer

lb.Size = 3
Expand All @@ -76,5 +72,4 @@ func TestLineBuffer(t *testing.T) {
assert.Equal(t, "hello7", lines[2])
})

n.Meow()
}

0 comments on commit 2e8b93f

Please sign in to comment.