From 8e3a6482bd9794e4805a47ad6692e319d830e67d Mon Sep 17 00:00:00 2001 From: edisonxiang Date: Thu, 18 Jan 2018 17:24:17 +0800 Subject: [PATCH] Integrate to CI --- .travis.yaml | 21 +++++++++++++++++++++ main.go | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .travis.yaml diff --git a/.travis.yaml b/.travis.yaml new file mode 100644 index 0000000..d5449f6 --- /dev/null +++ b/.travis.yaml @@ -0,0 +1,21 @@ +# Setting "sudo" to false forces Travis-CI to use its +# container-based build infrastructure, which has shorter +# queue times. +sudo: false + +# Use the newer Travis-CI build templates based on the +# Debian Linux distribution "Trusty" release. +dist: trusty + +# Select Go as the language used to run the build. +language: go +go: 1.9.x +go_import_path: github.com/dims/openstack-cloud-controller-manager + +install: + - make + +script: + - go vet github.com/dims/openstack-cloud-controller-manager/... + - go fmt github.com/dims/openstack-cloud-controller-manager/... + - go test -v github.com/dims/openstack-cloud-controller-manager/... -cover diff --git a/main.go b/main.go index 605f2ed..ce89cc2 100644 --- a/main.go +++ b/main.go @@ -34,8 +34,8 @@ import ( _ "k8s.io/kubernetes/pkg/version/prometheus" // for version metric registration "k8s.io/kubernetes/pkg/version/verflag" - "github.com/spf13/pflag" "github.com/golang/glog" + "github.com/spf13/pflag" ) var version string @@ -62,4 +62,4 @@ func main() { fmt.Fprintf(os.Stderr, "%v\n", err) os.Exit(1) } -} \ No newline at end of file +}