Skip to content

Commit

Permalink
Merge pull request #8 from fastbill/go-update-1.18
Browse files Browse the repository at this point in the history
update go and deps
  • Loading branch information
junedev authored May 20, 2022
2 parents eedf821 + adcdcd4 commit 4c85b2b
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 28 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run tests and linter

on: [push, pull_request, workflow_dispatch]

jobs:

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '^1.18.x'
- name: Install dependencies
run: go mod vendor
- name: Run tests
run: go test -race -cover ./...

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '^1.18.x'
- name: Install dependencies
run: go mod vendor
- uses: golangci/golangci-lint-action@v3
with:
version: v1.46
9 changes: 4 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
linters:
enable:
- gocyclo
- golint
- revive
- dupl
- interfacer
- unconvert
- goconst
- gosec
Expand All @@ -25,13 +24,13 @@ issues:
- govet
text: 'shadow: declaration of "err" shadows declaration'
- linters:
- golint
- revive
text: 'in another file for this package'

linters-settings:
gocyclo:
min-complexity: 10
golint:
revive:
min-confidence: 0
govet:
check-shadowing: true
check-shadowing: true
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
module github.com/fastbill/go-tiny-helpers/v2

go 1.13
go 1.18

require github.com/stretchr/testify v1.7.1

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/stretchr/testify v1.7.0
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
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 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 h1:dbuHpmKjkDzSOMKAWl10QNlgaZUd3V1q99xc81tt2Kc=
gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3 changes: 2 additions & 1 deletion maputil/maputil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package maputil_test
import (
"testing"

"github.com/fastbill/go-tiny-helpers/v2/maputil"
"github.com/stretchr/testify/assert"

"github.com/fastbill/go-tiny-helpers/v2/maputil"
)

func TestKeys(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion ptr/ptr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"testing"
"time"

"github.com/fastbill/go-tiny-helpers/v2/ptr"
"github.com/stretchr/testify/assert"

"github.com/fastbill/go-tiny-helpers/v2/ptr"
)

func TestString(t *testing.T) {
Expand Down

0 comments on commit 4c85b2b

Please sign in to comment.