-
Notifications
You must be signed in to change notification settings - Fork 27
/
.travis.yml
35 lines (31 loc) · 888 Bytes
/
.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
language: go
go:
- '1.14.x'
cache:
directories:
- $HOME/.cache/go-build
- $GOPATH/pkg/mod
install:
- go get ./...
- go get github.com/stretchr/testify/assert
jobs:
include:
- stage:
name: Test
script:
- go test -v -covermode=count -coverprofile=coverage.out ./...
after_success:
- echo "Sending coverage report to coveralls.io"
- go get github.com/mattn/goveralls
- goveralls -coverprofile=coverage.out -repotoken=$COVERALLS_TOKEN -service=travis-ci
- stage:
name: Lint
install:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
script:
- go mod download
- golangci-lint run --enable-all --new
- stage:
name: build
script:
- CGO_ENABLED=0 go build -o totp-cli