sum7
/
yaja
Archived
1
0
Fork 0

add gitlab-ci

This commit is contained in:
Martin/Geno 2018-12-14 23:52:28 +01:00
parent 7f4f6d5f71
commit c886269ff0
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 36 additions and 0 deletions

36
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,36 @@
image: golang:latest
stages:
- build
- test
before_script:
- mkdir -p /go/src/dev.sum7.eu/$CI_PROJECT_NAMESPACE/
- cp -R /builds/$CI_PROJECT_PATH /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
- mv /go/bin/$CI_PROJECT_NAME /builds/$CI_PROJECT_PATH
artifacts:
paths:
- $CI_PROJECT_NAME
test-my-project:
stage: test
script:
- go get github.com/client9/misspell/cmd/misspell
- misspell -error .
- ./.ci/check-gofmt
- ./.ci/check-testfiles
- go test $(go list ./... | grep -v /vendor/) -v -coverprofile .testCoverage.txt
artifacts:
paths:
- .testCoverage.txt
test-race-my-project:
stage: test
script:
- go test -race ./...