yanic/.gitlab-ci.yml

36 lines
1000 B
YAML
Raw Permalink Normal View History

2018-07-12 17:24:14 +02:00
image: golang:latest
stages:
- build
- test
before_script:
- mkdir -p /go/src/github.com/FreifunkBremen/
2019-04-10 13:19:58 +02:00
- cp -R /builds/freifunkbremen/yanic /go/src/github.com/FreifunkBremen/yanic
2018-07-12 17:24:14 +02:00
- cd /go/src/github.com/FreifunkBremen/yanic
2020-05-18 02:53:56 +02:00
- go get -t ./...
2018-07-12 17:24:14 +02:00
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 13:19:58 +02:00
- mkdir /builds/freifunkbremen/yanic/bin/
- cp /go/bin/yanic /builds/freifunkbremen/yanic/bin/yanic
2018-07-12 17:24:14 +02:00
artifacts:
paths:
2019-04-10 13:19:58 +02:00
- bin/yanic
- config_example.toml
- config-respondd_example.toml
2018-07-12 17:24:14 +02: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 13:19:58 +02:00
- go tool cover -func=.testCoverage.txt
2018-07-12 17:24:14 +02:00
test-race-my-project:
stage: test
script:
- go test -race ./...