-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
28 lines (25 loc) · 871 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
language: go
sudo: false
go:
- 1.21.x
- 1.20.x
go_import_path: github.com/nats-io/graft
install:
- go get -t ./...
- if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then
go install github.com/mattn/goveralls@latest;
go install github.com/wadey/gocovmerge@latest;
go install honnef.co/go/tools/cmd/staticcheck@latest;
go install github.com/client9/misspell/cmd/misspell@latest;
fi
before_script:
- $(exit $(go fmt ./... | wc -l))
- go vet ./...
- if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then
find . -type f -name "*.go" | xargs misspell -error -locale US;
staticcheck ./...;
fi
script:
- if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then ./scripts/cov.sh TRAVIS; else go test -race -v -p=1 ./... --failfast -vet=off; fi
after_success:
- if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi