ci load golang depens where needed

This commit is contained in:
Martin/Geno 2019-06-05 15:24:57 +02:00
parent 60bc6049b9
commit eddae7806f
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 3 additions and 3 deletions

View File

@ -6,12 +6,12 @@ stages:
before_script:
- mkdir -p /go/src/github.com/FreifunkBremen/
- cp -R $CI_PROJECT_DIR /go/src/github.com/FreifunkBremen/
- go get -v github.com/FreifunkBremen/$CI_PROJECT_NAME
- cd /go/src/github.com/FreifunkBremen/$CI_PROJECT_NAME
build-my-project:
stage: build
script:
- go get -v github.com/FreifunkBremen/$CI_PROJECT_NAME
- mkdir $CI_PROJECT_DIR/bin/
- cp /go/bin/$CI_PROJECT_NAME $CI_PROJECT_DIR/bin/$CI_PROJECT_NAME
artifacts:
@ -24,12 +24,12 @@ test-my-project:
script:
- ./.ci/check-gofmt
- ./.ci/check-testfiles
- go get -d github.com/stretchr/testify/assert
- go get -t -v github.com/FreifunkBremen/$CI_PROJECT_NAME
- go test $(go list ./... | grep -v /vendor/ | grep -v /webroot/) -v -coverprofile .testCoverage.txt
- go tool cover -func=.testCoverage.txt
test-race-my-project:
stage: test
script:
- go get -d github.com/stretchr/testify/assert
- go get -t -v github.com/FreifunkBremen/$CI_PROJECT_NAME
- go test -race ./...