2019-09-02 19:51:38 +05:00
|
|
|
image: lab.wtfteam.pro:4567/containers/golangci-lint
|
|
|
|
|
|
|
|
variables:
|
2019-09-02 20:13:20 +05:00
|
|
|
APP_PATH: develop.pztrn.name/gonews
|
2019-09-02 19:51:38 +05:00
|
|
|
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 20:17:03 +05:00
|
|
|
- ls -la
|
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 20:17:03 +05:00
|
|
|
- ls -la
|
2019-09-02 19:51:38 +05:00
|
|
|
- go test -test.v -cover ./...
|