Skip to content

Commit

Permalink
Try to fix CI again
Browse files Browse the repository at this point in the history
  • Loading branch information
VinGarcia committed Apr 20, 2022
1 parent 3899bb8 commit 76bad8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,30 @@ GOBIN=$(shell go env GOPATH)/bin

TIME=1s

test: setup
test: setup go-mod-tidy
$(GOBIN)/richgo test $(path) $(args)
@( cd benchmarks ; $(GOBIN)/richgo test $(path) $(args) )
@( cd examples ; $(GOBIN)/richgo test $(path) $(args) )
@( cd adapters/kpgx ; $(GOBIN)/richgo test $(path) $(args) )
@( cd adapters/kmysql ; $(GOBIN)/richgo test $(path) $(args) )
@( cd adapters/ksqlserver ; $(GOBIN)/richgo test $(path) $(args) )
@( cd adapters/ksqlite3 ; $(GOBIN)/richgo test $(path) $(args) )

bench:
bench: go-mod-tidy
cd benchmarks && go test -bench=. -benchtime=$(TIME)
@echo "Benchmark executed at: $$(date --iso)"
@echo "Benchmark executed on commit: $$(git rev-parse HEAD)"

lint: setup
lint: setup go-mod-tidy
@$(GOBIN)/staticcheck $(path) $(args)
@go vet $(path) $(args)
@make --no-print-directory -C benchmarks
@echo "StaticCheck & Go Vet found no problems on your code!"

# Run go mod tidy for all submodules:
go-mod-tidy:
@find -name go.mod -execdir go mod tidy \;

gen: mock
mock: setup
$(GOBIN)/mockgen -package=exampleservice -source=contracts.go -destination=examples/example_service/mocks.go
Expand Down
4 changes: 0 additions & 4 deletions examples/all_adapters/all_adapters.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func main() {
if err != nil {
log.Fatalf("unable to open database, reason: %s", err)
}
defer db.Close()

_, err = db.Exec(ctx, `CREATE TABLE users (
id serial PRIMARY KEY,
Expand All @@ -66,7 +65,6 @@ func main() {
if err != nil {
log.Fatalf("unable to open database: %s", err)
}
defer db.Close()

_, err = db.Exec(ctx, `CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
Expand All @@ -84,7 +82,6 @@ func main() {
if err != nil {
log.Fatalf("unable to open database: %s", err)
}
defer db.Close()

// In the example below NVARCHAR is the format
// we are using for storing JSON:
Expand All @@ -104,7 +101,6 @@ func main() {
if err != nil {
log.Fatalf("unable to open database: %s", err)
}
defer db.Close()

// In the definition below, please note that BLOB is
// the only type we can use in sqlite for storing JSON.
Expand Down

0 comments on commit 76bad8c

Please sign in to comment.