forked from CovenantSQL/CovenantSQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
33 lines (29 loc) · 1.32 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
33 lines (29 loc) · 1.32 KB
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
image: covenantsql/build
variables:
REVIEWDOG_VERSION: 0.9.9
REVIEWDOG_GITLAB_API_TOKEN: $REVIEWDOG_TOKEN
CODECOV_TOKEN: $CODECOV_TOKEN
before_script:
# Setup dependency management tool
# - curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o $GOPATH/bin/dep
# - chmod +x $GOPATH/bin/dep
# - go get github.com/mattn/goveralls
# - go get github.com/haya14busa/goverage
# - go get github.com/golang/lint/golint
# - go get github.com/haya14busa/reviewdog/cmd/reviewdog
- go get github.com/wadey/gocovmerge
- mkdir -p $GOPATH/src/github.com/
- cp -r /builds/CovenantSQL $GOPATH/src/github.com/
- cd $GOPATH/src/github.com/CovenantSQL/CovenantSQL
# - dep ensure
- mkdir -p ~/bin/ && export PATH="~/bin/:$PATH"
# - curl -fSL https://github.com/haya14busa/reviewdog/releases/download/$REVIEWDOG_VERSION/reviewdog_linux_amd64 -o ~/bin/reviewdog && chmod +x ~/bin/reviewdog
test-my-project:
stage: test
script:
- bash build.sh
- go test -v -race $(go list ./... | grep -v "/vendor/") -coverprofile cover.out
- gocovmerge cover.out $(find cmd -name "*.cover.out") > coverage.txt && rm -f cover.out
- bash <(curl -s https://codecov.io/bash)
- >-
golint ./... | grep -v 'vendor/' | grep -v 'server/' | grep -v 'utils/' | reviewdog -f=golint -reporter=github-mr-commit || true