2018-11-06 00:52:45 +01:00
|
|
|
image: golang:latest
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
|
|
|
|
before_script:
|
2019-02-14 02:43:16 +01:00
|
|
|
- mkdir -p /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/
|
|
|
|
- cp -R /builds/$CI_PROJECT_PATH /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/
|
|
|
|
- cd /go/src/dev.sum7.eu/$CI_PROJECT_PATH
|
2018-11-06 00:52:45 +01:00
|
|
|
- go get -d -t ./...
|
|
|
|
|
|
|
|
build-my-project:
|
|
|
|
stage: build
|
|
|
|
script:
|
2019-02-14 02:43:16 +01:00
|
|
|
- go install dev.sum7.eu/$CI_PROJECT_PATH
|
|
|
|
- mv /go/bin/$CI_PROJECT_NAME /builds/$CI_PROJECT_PATH
|
2018-11-06 00:52:45 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-02-14 02:43:16 +01:00
|
|
|
- $CI_PROJECT_NAME
|
2018-11-06 00:52:45 +01:00
|
|
|
|
|
|
|
test-my-project:
|
|
|
|
stage: test
|
|
|
|
script:
|
2019-02-14 02:43:16 +01:00
|
|
|
- go get github.com/client9/misspell/cmd/misspell
|
|
|
|
- misspell -error .
|
2018-11-06 00:52:45 +01:00
|
|
|
- ./.ci/check-gofmt
|
|
|
|
- ./.ci/check-testfiles
|
|
|
|
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- .testCoverage.txt
|
|
|
|
|
|
|
|
test-race-my-project:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- go test -race ./...
|