Give up on stages for a second, just try to get the matrix to work.

It looks like stages *combine* with the top-level stage, rather than
replacing it. So, the first stage will be "test", and will run the
top-level commands no matter what. Based on that, let's try to have
our old script as the top-level thing, but have it only run tests
when GOARCH=amd64. Other architectures will just build and vet/lint.
This commit is contained in:
David Anderson 2017-05-20 22:48:12 -07:00
parent c94f7ca1c6
commit abf3290c25

View File

@ -8,34 +8,43 @@ go:
os:
- linux
jobs:
include:
- stage: test
install:
- go get github.com/Masterminds/glide
- go get github.com/golang/lint/golint
script:
- glide install
- go test $(glide novendor)
- go vet $(glide novendor)
- glide novendor | xargs -n1 golint
go:
- 1.7
- 1.8
env:
- GOARCH=amd64
- stage: build
install:
- go get github.com/Masterminds/glide
- go get github.com/golang/lint/golint
script:
- glide install
- go build $(glide novendor)
install:
- go get github.com/Masterminds/glide
- go get github.com/golang/lint/golint
- gem install fpm
script:
- glide install
- go build $(glide novendor)
- "[ \"$GOARCH\" -eq \"amd64\" ] && go test $(glide novendor) || true"
- go vet $(glide novendor)
- glide novendor | xargs -n1 golint
# jobs:
# include:
# - stage: test
# install:
# - go get github.com/Masterminds/glide
# - go get github.com/golang/lint/golint
# script:
# - glide install
# - go test $(glide novendor)
# - go vet $(glide novendor)
# - glide novendor | xargs -n1 golint
# go:
# - 1.7
# - 1.8
# env:
# - GOARCH=amd64
# - stage: build
# install:
# - go get github.com/Masterminds/glide
# - go get github.com/golang/lint/golint
# script:
# - glide install
# - go build $(glide novendor)
# install:
# - go get github.com/Masterminds/glide
# - go get github.com/golang/lint/golint
# - gem install fpm
# before_script:
# script:
# - glide install