👷 Updated CI config
This commit is contained in:
parent
f9c11ddc83
commit
9ab2d0a5c4
2
Makefile
2
Makefile
|
@ -11,7 +11,7 @@ GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go)
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
lint: ## Lint the files
|
lint: ## Lint the files
|
||||||
@gocritic check-project $(PACKAGE_PATH)
|
@golangci-lint run
|
||||||
|
|
||||||
test: ## Run unittests
|
test: ## Run unittests
|
||||||
@go test -short ${PACKAGE_LIST}
|
@go test -short ${PACKAGE_LIST}
|
||||||
|
|
|
@ -12,10 +12,12 @@ stages:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
before_script:
|
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
|
- mkdir -p /go/src/gitlab.com/$CI_PROJECT_NAMESPACE /go/src/_/builds
|
||||||
- cp -r $CI_PROJECT_DIR /go/src/gitlab.com/$CI_PROJECT_PATH
|
- 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
|
- 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
|
- make dep
|
||||||
|
|
||||||
unit_tests:
|
unit_tests:
|
||||||
|
@ -32,10 +34,10 @@ code_coverage:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- make coverage
|
- make coverage
|
||||||
|
coverage: '/^coverage:\s(\d+(?:\.\d+)?%)/'
|
||||||
|
|
||||||
lint_code:
|
lint_code:
|
||||||
stage: test
|
stage: review
|
||||||
script:
|
script:
|
||||||
- go get github.com/go-critic/go-critic/cmd/gocritic
|
|
||||||
- go install github.com/go-critic/go-critic/cmd/gocritic
|
|
||||||
- make lint
|
- make lint
|
||||||
|
allow_failure: true
|
Loading…
Reference in New Issue
Block a user