ci improve + add misspelling checks
This commit is contained in:
parent
2689479a51
commit
6cacb72aa9
|
@ -7,14 +7,15 @@ variables:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/
|
- mkdir -p "/go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/"
|
||||||
- cp -R $CI_PROJECT_DIR /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
|
- cd "/go/src/dev.sum7.eu/$CI_PROJECT_PATH"
|
||||||
- go get -v dev.sum7.eu/$CI_PROJECT_PATH
|
- go get -d -t ./...
|
||||||
|
|
||||||
build-my-project:
|
build-my-project:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
- go install "dev.sum7.eu/$CI_PROJECT_PATH"
|
||||||
- mkdir $CI_PROJECT_DIR/bin/
|
- mkdir $CI_PROJECT_DIR/bin/
|
||||||
- cp /go/bin/$CI_PROJECT_NAME $CI_PROJECT_DIR/bin/$CI_PROJECT_NAME
|
- cp /go/bin/$CI_PROJECT_NAME $CI_PROJECT_DIR/bin/$CI_PROJECT_NAME
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -25,14 +26,17 @@ build-my-project:
|
||||||
test-my-project:
|
test-my-project:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- go get github.com/client9/misspell/cmd/misspell
|
||||||
|
- misspell -error .
|
||||||
- ./.ci/check-gofmt
|
- ./.ci/check-gofmt
|
||||||
- ./.ci/check-testfiles
|
- ./.ci/check-testfiles
|
||||||
- go get -d github.com/stretchr/testify/assert
|
|
||||||
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
|
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
|
||||||
- go tool cover -func=.testCoverage.txt
|
- go tool cover -func=.testCoverage.txt
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- .testCoverage.txt
|
||||||
|
|
||||||
test-race-my-project:
|
test-race-my-project:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- go get -d github.com/stretchr/testify/assert
|
|
||||||
- go test -race ./...
|
- go test -race ./...
|
||||||
|
|
Reference in New Issue