From d14d3386c78acd9e688da668ad8e120f831e76e2 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Thu, 12 Jul 2018 17:24:14 +0200 Subject: [PATCH] [TASK] add support for gitlab --- .gitlab-ci.yml | 31 ++++++++++++++++++++++++++++++ .gitlab/issue_templates/default.md | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 .gitlab/issue_templates/default.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d588e65 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,31 @@ +image: golang:latest +stages: + - build + - test + +before_script: + - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + - mkdir -p /go/src/github.com/FreifunkBremen/ + - cp -R /builds/FreifunkBremen/yanic /go/src/github.com/FreifunkBremen/yanic + - cd /go/src/github.com/FreifunkBremen/yanic + - dep ensure + +build-my-project: + stage: build + script: + - go install -ldflags "-X github.com/FreifunkBremen/yanic/cmd.VERSION=`git -C $GOPATH/src/github.com/FreifunkBremen/yanic rev-parse HEAD`" github.com/FreifunkBremen/yanic + artifacts: + paths: + - /go/bin/yanic + +test-my-project: + stage: test + script: + - ./.circleci/check-gofmt + - ./.circleci/check-testfiles + - go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt + +test-race-my-project: + stage: test + script: + - go test -race ./... diff --git a/.gitlab/issue_templates/default.md b/.gitlab/issue_templates/default.md new file mode 100644 index 0000000..6110831 --- /dev/null +++ b/.gitlab/issue_templates/default.md @@ -0,0 +1,7 @@ + +## Checklist: + + +- [ ] I mentioned the community +- [ ] I mentioned the database type +- [ ] I added a link to the visualization of the collected data