2019-09-02 19:51:38 +05:00
|
|
|
image: lab.wtfteam.pro:4567/containers/golangci-lint
|
|
|
|
|
|
|
|
variables:
|
|
|
|
APP_PATH: $APP_PATH
|
|
|
|
APP_NAME: gonews
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- go version
|
|
|
|
- golangci-lint --version
|
|
|
|
- mkdir -p $GOPATH/src/$APP_PATH/$APP_NAME
|
|
|
|
- ln -s $CI_PROJECT_DIR $GOPATH/src/$APP_PATH/$APP_NAME
|
|
|
|
- cd $GOPATH/src/$APP_PATH/$APP_NAME
|
|
|
|
|
|
|
|
lint:
|
|
|
|
stage: test
|
2019-09-02 19:56:35 +05:00
|
|
|
tags:
|
|
|
|
- docker
|
2019-09-02 19:51:38 +05:00
|
|
|
script:
|
2019-09-02 20:09:31 +05:00
|
|
|
- pwd
|
2019-09-02 19:51:38 +05:00
|
|
|
- golangci-lint linters
|
|
|
|
- golangci-lint run
|
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
2019-09-02 19:56:35 +05:00
|
|
|
tags:
|
|
|
|
- docker
|
2019-09-02 19:51:38 +05:00
|
|
|
script:
|
2019-09-02 20:09:31 +05:00
|
|
|
- pwd
|
2019-09-02 19:51:38 +05:00
|
|
|
- go test -test.v -cover ./...
|