From c886269ff0dafb9725df4d27e96156cbe28b647a Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Fri, 14 Dec 2018 23:52:28 +0100 Subject: [PATCH] add gitlab-ci --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..243f041 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +image: golang:latest +stages: + - build + - test + +before_script: + - mkdir -p /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/ + - cp -R /builds/$CI_PROJECT_PATH /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/ + - cd /go/src/dev.sum7.eu/$CI_PROJECT_PATH + - go get -d -t ./... + +build-my-project: + stage: build + script: + - go install dev.sum7.eu/$CI_PROJECT_PATH + - mv /go/bin/$CI_PROJECT_NAME /builds/$CI_PROJECT_PATH + artifacts: + paths: + - $CI_PROJECT_NAME + +test-my-project: + stage: test + script: + - go get github.com/client9/misspell/cmd/misspell + - misspell -error . + - ./.ci/check-gofmt + - ./.ci/check-testfiles + - go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt + artifacts: + paths: + - .testCoverage.txt + +test-race-my-project: + stage: test + script: + - go test -race ./...