From 876718bec25d3c4a0c5ef74db2f521210443cfb6 Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Tue, 5 Nov 2019 14:17:34 +0000 Subject: [PATCH] Add .gitlab-ci.yml --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..26527dc --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,32 @@ +# This file is a template, and might need editing before it works on your project. +image: golang:latest + +# The problem is that to be able to use go get, one needs to put +# the repository in the $GOPATH. So for example if your gitlab domain +# is gitlab.com, and that your repository is namespace/project, and +# the default GOPATH being /go, then you'd need to have your +# repository in /go/src/gitlab.com/namespace/project +# Thus, making a symbolic link corrects this. +before_script: + - mkdir -p $GOPATH/src/$(dirname $REPO_NAME) + - ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME + - cd $GOPATH/src/$REPO_NAME + +stages: + - test + #- build + - deploy + +test: + stage: test + script: + - go test -race $(go list ./... | grep -v /vendor/) + +pages: + stage: deploy + script: + - mkdir public + - echo "go/log page" >publi/index.html + artifacts: + paths: + - public