improve travis integration

This commit is contained in:
Adam Babik 2017-10-20 12:10:28 +02:00
parent e911666b5d
commit a21fd963de
2 changed files with 16 additions and 6 deletions

View File

@ -9,9 +9,17 @@ dist: trusty
install: install:
- go get golang.org/x/tools/cmd/cover - go get golang.org/x/tools/cmd/cover
- make mock-install
- make mock
script: jobs:
- travis_wait make ci include:
- stage: Lint
script: make lint
- stage: Test unit and integration
script: make test-unit-coverage
- stage: Test e2e
script: travis_wait make test-e2e
cache: cache:
directories: directories:

View File

@ -136,10 +136,12 @@ mock-install: ##@other Install mocking tools
mock: ##@other Regenerate mocks mock: ##@other Regenerate mocks
mockgen -source=geth/common/types.go -destination=geth/common/types_mock.go -package=common mockgen -source=geth/common/types.go -destination=geth/common/types_mock.go -package=common
test: ##@tests Run unit and integration tests test: test-unit-coverage ##@tests Run basic, short tests during development
test-unit: ##@tests Run unit and integration tests
build/env.sh go test $(UNIT_TEST_PACKAGES) build/env.sh go test $(UNIT_TEST_PACKAGES)
test-coverage: ##@tests Run unit and integration tests with covevare test-unit-coverage: ##@tests Run unit and integration tests with coverage
build/env.sh go test -coverpkg= $(UNIT_TEST_PACKAGES) build/env.sh go test -coverpkg= $(UNIT_TEST_PACKAGES)
test-e2e: ##@tests Run e2e tests test-e2e: ##@tests Run e2e tests
@ -153,7 +155,7 @@ test-e2e: ##@tests Run e2e tests
build/env.sh go test -timeout 10m ./e2e/transactions/... build/env.sh go test -timeout 10m ./e2e/transactions/...
build/env.sh go test -timeout 10m ./cmd/statusd build/env.sh go test -timeout 10m ./cmd/statusd
ci: mock-install mock test-coverage test-e2e ##@tests Run all tests in CI ci: lint mock-install mock test-unit test-e2e ##@tests Run all tests in CI
clean: ##@other Cleanup clean: ##@other Cleanup
rm -fr build/bin/* rm -fr build/bin/*