This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
thrempp/.gitlab-ci.yml

37 lines
1.0 KiB
YAML

image: golang:latest
stages:
- build
- test
before_script:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- mkdir -p /go/src/dev.sum7.eu/genofire/
- cp -R /builds/freifunkbremen/thrempp /go/src/dev.sum7.eu/genofire/thrempp
- cd /go/src/dev.sum7.eu/genofire/thrempp
- dep ensure
build-my-project:
stage: build
script:
- go install -ldflags "-X dev.sum7.eu/genofire/thrempp/cmd.VERSION=`git -C $GOPATH/src/dev.sum7.eu/genofire/thrempp rev-parse HEAD`" dev.sum7.eu/genofire/thrempp
- mkdir /builds/freifunkbremen/thrempp/bin/
- cp /go/bin/thrempp /builds/freifunkbremen/thrempp/bin/thrempp
artifacts:
paths:
- bin/thrempp
- config_example.toml
- config-respondd_example.toml
test-my-project:
stage: test
script:
- ./.circleci/check-gofmt
- ./.circleci/check-testfiles
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
- go tool cover -func=.testCoverage.txt
test-race-my-project:
stage: test
script:
- go test -race ./...