cleanup build script
This commit is contained in:
Родитель
4286ab3ea3
Коммит
7de05611de
|
@ -3,9 +3,11 @@ build:
|
|||
image: golang:1.6
|
||||
commands:
|
||||
- make deps
|
||||
- make gen_assets gen_migration
|
||||
- make test
|
||||
dist:
|
||||
image: golang:1.6
|
||||
commands:
|
||||
- make test_mysql
|
||||
- make build
|
||||
when:
|
||||
|
|
14
Makefile
14
Makefile
|
@ -7,18 +7,24 @@ deps:
|
|||
go get -u github.com/elazarl/go-bindata-assetfs/...
|
||||
go get -u github.com/vektra/mockery/...
|
||||
|
||||
gen:
|
||||
gen: gen_assets gen_mocks gen_migration
|
||||
|
||||
gen_assets:
|
||||
go generate github.com/lgtmco/lgtm/web/static
|
||||
go generate github.com/lgtmco/lgtm/web/template
|
||||
go generate github.com/lgtmco/lgtm/remote
|
||||
go generate github.com/lgtmco/lgtm/store/migration
|
||||
|
||||
gen_mocks:
|
||||
go generate github.com/lgtmco/lgtm/store
|
||||
go generate github.com/lgtmco/lgtm/remote
|
||||
|
||||
gen_migration:
|
||||
go generate github.com/lgtmco/lgtm/store/migration
|
||||
|
||||
build:
|
||||
go build --ldflags '-extldflags "-static" -X github.com/lgtmco/lgtm/version.VersionDev=$(CI_BUILD_NUMBER)' -o lgtm
|
||||
|
||||
test:
|
||||
@for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG; done;
|
||||
@for PKG in $(PACKAGES); do go test -v -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG; done;
|
||||
|
||||
test_mysql:
|
||||
DATABASE_DRIVER="mysql" DATABASE_DATASOURCE="root@tcp(127.0.0.1:3306)/test?parseTime=true" go test -v -cover github.com/lgtmco/lgtm/store/datastore
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package mock
|
||||
|
||||
import "github.com/lgtmco/lgtm/cache"
|
||||
import "github.com/stretchr/testify/mock"
|
||||
|
||||
type Cache struct {
|
||||
|
|
Загрузка…
Ссылка в новой задаче