From a21fd963de7202b2c9d7b8ab1bfe47646b8b5d7e Mon Sep 17 00:00:00 2001 From: Adam Babik Date: Fri, 20 Oct 2017 12:10:28 +0200 Subject: [PATCH] improve travis integration --- .travis.yml | 12 ++++++++++-- Makefile | 10 ++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a3b32e80..854b66373 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,17 @@ dist: trusty install: - go get golang.org/x/tools/cmd/cover + - make mock-install + - make mock -script: - - travis_wait make ci +jobs: + 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: directories: diff --git a/Makefile b/Makefile index b134700d1..d72ae0225 100644 --- a/Makefile +++ b/Makefile @@ -136,10 +136,12 @@ mock-install: ##@other Install mocking tools mock: ##@other Regenerate mocks 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) -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) 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 ./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 rm -fr build/bin/* @@ -161,4 +163,4 @@ clean: ##@other Cleanup LINT_EXCLUDE := --exclude='.*_mock.go' --exclude='geth/jail/doc.go' -LINT_FOLDERS := extkeys cmd/... geth/... e2e/... \ No newline at end of file +LINT_FOLDERS := extkeys cmd/... geth/... e2e/...