ci improve + add misspelling checks

This commit is contained in:
Martin/Geno 2019-06-18 01:16:07 +02:00
parent 2689479a51
commit 6cacb72aa9
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 10 additions and 6 deletions

View File

@ -7,14 +7,15 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- mkdir -p /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
- go get -v dev.sum7.eu/$CI_PROJECT_PATH
- mkdir -p "/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"
- go get -d -t ./...
build-my-project:
stage: build
script:
- go install "dev.sum7.eu/$CI_PROJECT_PATH"
- mkdir $CI_PROJECT_DIR/bin/
- cp /go/bin/$CI_PROJECT_NAME $CI_PROJECT_DIR/bin/$CI_PROJECT_NAME
artifacts:
@ -25,14 +26,17 @@ build-my-project:
test-my-project:
stage: test
script:
- go get github.com/client9/misspell/cmd/misspell
- misspell -error .
- ./.ci/check-gofmt
- ./.ci/check-testfiles
- go get -d github.com/stretchr/testify/assert
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
- go tool cover -func=.testCoverage.txt
artifacts:
paths:
- .testCoverage.txt
test-race-my-project:
stage: test
script:
- go get -d github.com/stretchr/testify/assert
- go test -race ./...