forked from lalamove/logs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
39 lines (34 loc) · 894 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
image: golang:latest
variables:
WORK_DIR: /go/src/github.com/lalamove-go
before_script:
- mkdir -p $WORK_DIR
- cd $WORK_DIR
- ln -sf $CI_PROJECT_DIR
- cd $CI_PROJECT_NAME
pages:
stage: deploy
script:
- go version
- echo $CI_BUILD_REF
- echo $CI_PROJECT_DIR
- pwd
- go get -u github.com/golang/dep/cmd/dep golang.org/x/tools/cmd/godoc
- dep init -v
- go test -short ./... -covermode=count -coverprofile=coverage.out
- mkdir public
- go fmt ./...
- go tool cover -func=coverage.out
- go tool cover -html=coverage.out -o public/coverage.html
- curl -s https://codecov.io/bash > ci.sh
- chmod 777 ./ci.sh
- ./ci.sh -t $CODECOV_TOKEN
artifacts:
paths:
- public
lint:
stage: test
allow_failure: true
script:
- go get -u github.com/mgechev/revive
- revive -formatter stylish --exclude=./vendor/... ./...