This commit is contained in:
Brad Rydzewski 2016-04-19 00:18:27 -07:00
Родитель 4286ab3ea3
Коммит 7de05611de
3 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -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:

Просмотреть файл

@ -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
cache/mock/cache.go поставляемый
Просмотреть файл

@ -1,6 +1,5 @@
package mock
import "github.com/lgtmco/lgtm/cache"
import "github.com/stretchr/testify/mock"
type Cache struct {