yanic/.gitlab-ci.yml

37 lines
1.0 KiB
YAML
Raw Permalink Normal View History

2018-07-12 15:24:14 +00:00
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/
2019-04-10 11:19:58 +00:00
- cp -R /builds/freifunkbremen/yanic /go/src/github.com/FreifunkBremen/yanic
2018-07-12 15:24:14 +00:00
- 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
2019-04-10 11:19:58 +00:00
- mkdir /builds/freifunkbremen/yanic/bin/
- cp /go/bin/yanic /builds/freifunkbremen/yanic/bin/yanic
2018-07-12 15:24:14 +00:00
artifacts:
paths:
2019-04-10 11:19:58 +00:00
- bin/yanic
- config_example.toml
- config-respondd_example.toml
2018-07-12 15:24:14 +00:00
test-my-project:
stage: test
script:
- ./.circleci/check-gofmt
- ./.circleci/check-testfiles
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
2019-04-10 11:19:58 +00:00
- go tool cover -func=.testCoverage.txt
2018-07-12 15:24:14 +00:00
test-race-my-project:
stage: test
script:
- go test -race ./...