[TASK] add support for gitlab

This commit is contained in:
Martin/Geno 2018-07-12 17:24:14 +02:00
parent 4551923d46
commit d14d3386c7
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
2 changed files with 38 additions and 0 deletions

31
.gitlab-ci.yml Normal file
View File

@ -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 ./...

View File

@ -0,0 +1,7 @@
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I mentioned the community
- [ ] I mentioned the database type
- [ ] I added a link to the visualization of the collected data