This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.travis.yml
53 lines (40 loc) · 1.44 KB
/
.travis.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: go
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.24.0
go:
- master
- "1.12"
install: true
matrix:
allow_failures:
- go: master
fast_finish: true
notifications:
email: true
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose up -d zero server
before_script:
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
- go get golang.org/x/lint/golint # Linter
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/go-playground/overalls
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0
script:
# go vet is the official Go static analyzer
- go vet ./...
# golangci-link
- golangci-lint run ./...
# one last linter
- golint -set_exit_status $(go list ./...)
# Build cmd/api
- go build -o apisrv cmd/api
# Run all the tests with the race detector enabled
- overalls -project=github.com/romshark/dgraph_graphql_go -covermode=atomic -debug -- -race -v -coverpkg=./...
- $HOME/gopath/bin/goveralls -coverprofile=overalls.coverprofile -service=travis-ci -repotoken=$COVERALLS_TOKEN