diff --git a/circle.yml b/circle.yml index 503b7bc8f..c66114bea 100644 --- a/circle.yml +++ b/circle.yml @@ -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 diff --git a/pkg/pkg_test.go b/pkg/pkg_test.go new file mode 100644 index 000000000..ef3c61346 --- /dev/null +++ b/pkg/pkg_test.go @@ -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+)") + } +}