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.
2019-05-31 10:07:40 +02:00
|
|
|
image: golang:latest
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
|
2019-06-02 02:12:45 +02:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
2019-05-31 10:07:40 +02:00
|
|
|
before_script:
|
|
|
|
- mkdir -p /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/
|
|
|
|
- cp -R $CI_PROJECT_DIR /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE
|
|
|
|
- cd /go/src/dev.sum7.eu/$CI_PROJECT_PATH
|
|
|
|
- go get -v dev.sum7.eu/$CI_PROJECT_PATH
|
|
|
|
|
|
|
|
build-my-project:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- mkdir $CI_PROJECT_DIR/bin/
|
|
|
|
- cp /go/bin/$CI_PROJECT_NAME $CI_PROJECT_DIR/bin/$CI_PROJECT_NAME
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- bin/thrempp
|
|
|
|
- config_example.toml
|
|
|
|
|
|
|
|
test-my-project:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- ./.ci/check-gofmt
|
|
|
|
- ./.ci/check-testfiles
|
2019-06-02 02:12:45 +02:00
|
|
|
- go get -d github.com/stretchr/testify/assert
|
2019-05-31 10:07:40 +02:00
|
|
|
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
|
|
|
|
- go tool cover -func=.testCoverage.txt
|
|
|
|
|
|
|
|
test-race-my-project:
|
|
|
|
stage: test
|
|
|
|
script:
|
2019-06-02 02:12:45 +02:00
|
|
|
- go get -d github.com/stretchr/testify/assert
|
2019-05-31 10:07:40 +02:00
|
|
|
- go test -race ./...
|