💚 Changed CI config

This commit is contained in:
Maxim Lebedev 2018-07-27 16:51:33 +05:00
parent 5112c12848
commit dce3f313ed
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
2 changed files with 41 additions and 9 deletions

41
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,41 @@
image: golang:alpine
cache:
paths:
- /go/src/github.com
- /go/src/gitlab.com
- /go/src/golang.org
- /go/src/google.golang.org
- /go/src/gopkg.in
stages:
- test
before_script:
- apk add --no-cache git build-base bash
- mkdir -p /go/src/gitlab.com/$CI_PROJECT_NAMESPACE /go/src/_/builds
- 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
- make dep
unit_tests:
stage: test
script:
- make test
.race_detector:
stage: test
script:
- make race
code_coverage:
stage: test
script:
- make coverage
lint_code:
stage: test
script:
- go get github.com/go-critic/go-critic/cmd/gocritic
- go install github.com/go-critic/go-critic/cmd/gocritic
- make lint

View File

@ -1,9 +0,0 @@
language: go
go:
- 1.7
- tip
install:
- go get
- go get golang.org/x/net/html