From 8455b88e102b413905194dbec05bc245739e14fc Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Sun, 26 May 2019 09:10:24 +0100 Subject: [PATCH] travis: splitting into multiple builds to highlight what failed --- .travis.yml | 14 ++++++++++---- GNUmakefile | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f6acdb43436e..d687a587eb80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,13 @@ services: - docker language: go go: -- "1.11.x" +- "1.12.x" + +env: + matrix: + - MODE=unit-tests + - MODE=linters + - MODE=website install: # This script is used by the Travis build to install a cookie for @@ -15,9 +21,9 @@ install: - make tools script: -- make test -- GOGC=30 make lint -- make website-test + - if [[ $MODE == 'unit-tests' ]]; then make test; fi + - if [[ $MODE == 'linters' ]]; then GOGC=30 make lint; fi + - if [[ $MODE == 'website' ]]; then make website-test; fi branches: only: diff --git a/GNUmakefile b/GNUmakefile index 4300eb633686..e7e48cdcfa3e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -14,10 +14,10 @@ build: fmtcheck build-docker: mkdir -p bin - docker run --rm -v $$(pwd)/bin:/go/bin -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm -e GOOS golang:1.11 make build + docker run --rm -v $$(pwd)/bin:/go/bin -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm -e GOOS golang:1.12 make build test-docker: - docker run --rm -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm golang:1.11 make test + docker run --rm -v $$(pwd):/go/src/github.com/terraform-providers/terraform-provider-azurerm -w /go/src/github.com/terraform-providers/terraform-provider-azurerm golang:1.12 make test test: fmtcheck go test -i $(TEST) || exit 1