This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
48 lines (38 loc) · 1.47 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
sudo: false
language: go
# Force-enable Go modules. This will be unnecessary when Go 1.12 lands.
env:
- GO111MODULE=on
- COVERALLS_REPO_TOKEN=vK21004U6mkvHJQCVpL8xKcUDFf4CMcx9
go:
- tip
git:
depth: 1
# Skip the install step. Don't `go get` dependencies. Only build with the code
# in vendor/
install: true
# Don't email me the results of the test runs.
notifications:
email: false
before_script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
before_install:
- go get -t -v ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
# Anything in before_script that returns a nonzero exit code will flunk the
# build and immediately stop. It's sorta like having set -e enabled in bash.
# Make sure golangci-lint is vendored.
#before_script:
# - go install -mod vendor github.com/golangci/golangci-lint/cmd/golangci-lint
# script always runs to completion (set +e). If we have linter issues AND a
# failing test, we want to see both. Configure golangci-lint with a
# .golangci.yml file at the top level of your repo.
script:
# - golangci-lint run # run a bunch of code checkers/linters in parallel
# - go test -v -race ./... # Run all the tests with the race detector enabled
# - go test -v -race ./...
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- go test -v -covermode=count -coverprofile=coverage.out
- $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken=$COVERALLS_REPO_TOKEN