diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 975a16a..7e03afd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,16 @@ image: golang:alpine -cache: - paths: - - /go/src/github.com - - /go/src/gitlab.com - - /go/src/golang.org - - /go/src/google.golang.org - - /go/src/gopkg.in - stages: - test + - review before_script: - - apk add --no-cache git build-base bash + - apk add --no-cache git build-base bash make - mkdir -p /go/src/gitlab.com/$CI_PROJECT_NAMESPACE /go/src/_/builds - cp -r $CI_PROJECT_DIR /go/src/gitlab.com/$CI_PROJECT_PATH - ln -s /go/src/gitlab.com/$CI_PROJECT_NAMESPACE /go/src/_/builds/$CI_PROJECT_NAMESPACE + - go get github.com/golangci/golangci-lint/cmd/golangci-lint + - go install github.com/golangci/golangci-lint/cmd/golangci-lint - make dep unit_tests: @@ -23,19 +18,14 @@ unit_tests: script: - make test -.race_detector: - stage: test - script: - - make race - code_coverage: stage: test script: - make coverage + coverage: '/^coverage:\s(\d+(?:\.\d+)?%)/' lint_code: - stage: test + stage: review script: - - go get github.com/go-critic/go-critic/cmd/gocritic - - go install github.com/go-critic/go-critic/cmd/gocritic - - make lint \ No newline at end of file + - make lint + allow_failure: true