Merge pull request #536 from technosophos/fix/circleci-go16

fix(circleci): add Go 1.6
pull/484/head
Matt Butcher 9 years ago
commit 989ef308e4

@ -1,13 +1,20 @@
machine:
environment:
GLIDE_VERSION: "0.9.1"
GLIDE_VERSION: "0.10.1"
GO15VENDOREXPERIMENT: 1
GOPATH: /usr/local/go_workspace
HOME: /home/ubuntu
IMPORT_PATH: "github.com/kubernetes/helm"
PATH: $HOME/go/bin:$PATH
GOROOT: $HOME/go
dependencies:
override:
- mkdir -p $HOME/go
- wget "https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz"
- tar -C $HOME -xzf go1.6.linux-amd64.tar.gz
- go version
- go env
- sudo chown -R $(whoami):staff /usr/local
- cd $GOPATH
- mkdir -p $GOPATH/src/$IMPORT_PATH

@ -0,0 +1,15 @@
package pkg
import (
"testing"
"text/template"
)
// TestGoFeatures is a canary test to make sure that features that are invisible at API level are supported.
func TestGoFeatures(t *testing.T) {
// Test that template with Go 1.6 syntax can compile.
_, err := template.New("test").Parse(`{{- printf "hello"}}`)
if err != nil {
t.Fatalf("You must use a version of Go that supports {{- template syntax. (1.6+)")
}
}
Loading…
Cancel
Save