Skip to content

Commit

Permalink
updates and circle test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Bice committed Nov 15, 2020
1 parent 18aeaef commit 14b2601
Show file tree
Hide file tree
Showing 8 changed files with 239 additions and 69 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ jobs:
docker:
- image: circleci/golang:1.13
<<: *common_parts
golang_1.14:
docker:
- image: circleci/golang:1.14
<<: *common_parts
golang_1.15:
docker:
- image: circleci/golang:1.15
<<: *common_parts

workflows:
version: 2
Expand All @@ -36,3 +44,5 @@ workflows:
- golang_1.11
- golang_1.12
- golang_1.13
- golang_1.14
- golang_1.15
34 changes: 30 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,28 @@ else
endif

GO ?= GO111MODULE=on go

include $(wildcard *.mk)

COVERAGEDIR = coverage
SERVICE=local
ifdef CIRCLE_WORKING_DIRECTORY
COVERAGEDIR = $(CIRCLE_WORKING_DIRECTORY)/coverage
SERVICE=circle-ci
endif

define goinstall
mkdir -p $(shell pwd)/bin
echo "Installing $(1)"
GOBIN=$(shell pwd)/bin go install $(1)
endef

GOBINDATA=bin/go-bindata
GOIMPORTS=bin/goimports
GOVERALLS=bin/goveralls
MOCKGEN=bin/mockgen
deps: $(MOCKGEN)
deps: $(GOBINDATA)
deps: $(GOIMPORTS)
deps: $(GOVERALLS)

PACKAGES='./generator' './example'

.PHONY: all
Expand All @@ -39,10 +51,11 @@ tc: test cover
coveralls: $(GOVERALLS)
$(GOVERALLS) -coverprofile=coverage.out -service=$(SERVICE) -repotoken=$(COVERALLS_TOKEN)

clean: cleandeps
clean:
$(GO) clean
rm -f bin/go-enum
rm -rf coverage/
rm -rf bin/

.PHONY: generate
generate:
Expand All @@ -59,3 +72,16 @@ phony: clean tc build
.PHONY: example
example:
$(GO) generate ./example


bin/goimports: go.sum
$(call goinstall,golang.org/x/tools/cmd/goimports)

bin/mockgen: go.sum
$(call goinstall,github.com/golang/mock/mockgen)

bin/goveralls: go.sum
$(call goinstall,github.com/mattn/goveralls)

bin/go-bindata: go.sum
$(call goinstall,github.com/kevinburke/go-bindata/go-bindata)
18 changes: 0 additions & 18 deletions deps.mk

This file was deleted.

2 changes: 1 addition & 1 deletion example/sql_1_11_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build go1.11
//go:generate ../bin/go/github.com/golang/mock/mockgen -destination sql_mock_test.go -package example database/sql/driver Conn,Driver,Stmt,Result,Rows
//go:generate ../bin/mockgen -destination sql_mock_test.go -package example database/sql/driver Conn,Driver,Stmt,Result,Rows

/*
This example shows the conversion of enumerations between GO and SQL database.
Expand Down
9 changes: 6 additions & 3 deletions generator/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generator/generator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate ../bin/go/github.com/kevinburke/go-bindata/go-bindata -nometadata -o assets/assets.go -pkg=assets enum.tmpl
//go:generate ../bin/go-bindata -nometadata -o assets/assets.go -pkg=assets enum.tmpl

package generator

Expand Down
27 changes: 12 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,23 @@ require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/bradleyjkemp/cupaloy v2.2.0+incompatible
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-easygen/cli v0.2.0
github.com/golang/mock v1.3.1
github.com/google/uuid v1.1.1 // indirect
github.com/huandu/xstrings v1.3.0 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/kevinburke/go-bindata v3.16.0+incompatible
github.com/labstack/gommon v0.3.0 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/mattn/goveralls v0.0.5
github.com/golang/mock v1.4.4
github.com/google/uuid v1.1.2 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/kevinburke/go-bindata v3.22.0+incompatible
github.com/kr/pretty v0.2.1 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/goveralls v0.0.7
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/reflectwalk v1.0.1 // indirect
github.com/mkideal/cli v0.0.3 // indirect
github.com/mkideal/pkg v0.0.0-20170503154153-3e188c9e7ecc // indirect
github.com/mkideal/pkg v0.1.2 // indirect
github.com/pkg/errors v0.9.1
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d // indirect
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 // indirect
golang.org/x/tools v0.0.0-20200117170720-ade7f2547e48
gopkg.in/yaml.v2 v2.2.7 // indirect
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 // indirect
golang.org/x/sys v0.0.0-20201113233024-12cec1faf1ba // indirect
golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b
)
Loading

0 comments on commit 14b2601

Please sign in to comment.