Skip to content

Commit

Permalink
travis: splitting into multiple builds to highlight what failed
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed May 26, 2019
1 parent 8f6f746 commit 8455b88
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8455b88

Please sign in to comment.