Skip to content

Commit

Permalink
feat(build): Added the makefile to run builds and test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-malhotra1 committed Jul 14, 2020
1 parent 4df1df7 commit b521639
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ language: go

dist: xenial

go:
- 1.12.x

notifications:
email: true

Expand All @@ -21,8 +24,7 @@ install:
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0

script:
- go test `go list ./...` -tags integration
- golangci-lint run
- make travis-ci

# To enable semantic-release, uncomment these sections.
before_deploy:
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Makefile to build go-sdk-template

all: build unittest lint tidy

travis-ci: build alltest lint tidy

build:
go build ./...

unittest:
go test `go list ./... | grep -v samples`

alltest:
go test `go list ./... | grep -v samples` -v -tags=integration

lint:
golangci-lint run

tidy:
go mod tidy

0 comments on commit b521639

Please sign in to comment.