forked from fyne-io/fyne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (39 loc) · 1.88 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
language: go
go:
- "1.11.x"
- "1.12.x"
go_import_path: fyne.io/fyne
os:
- linux
- osx
addons:
apt:
packages:
- libgl1-mesa-dev
- xorg-dev
gobuild_args: "-v -tags ci"
# Disable travis default install step (go get ${gobuild_args} ./...)
install: true
before_script:
- NO_VENDOR=$(find . -iname '*.go' -type f | grep -v /vendor/)
- go get golang.org/x/lint/golint
- go get github.com/mattn/goveralls
script:
- test -z $(gofmt -s -e -d $NO_VENDOR | tee /dev/stderr)
# enable go modules only for 1.12.x
- if [[ "$TRAVIS_GO_VERSION" == 1.12* ]]; then export GO111MODULE=on; fi
# test vendor folder only for 1.12.x on osx
- if [[ "$TRAVIS_GO_VERSION" == 1.12* && "$TRAVIS_OS_NAME" == "osx" ]]; then export GOFLAGS=-mod=vendor; fi
- go test -tags ci ./...
- go vet -tags ci -unsafeptr=false ./...
- golint -set_exit_status $(go list -tags ci ./...)
- |
set -e
if [ "$TRAVIS_PULL_REQUEST" == "false" && -n "$COVERALLS_TOKEN" ]
then
go test -tags ci -covermode=atomic -coverprofile=coverage.out ./...
$(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
fi
env:
global:
secure: dxsvChfy84dx85yoDA08UQL9/uwuab2St/yzWGfI++tlY1yL+kUNTfaTTY0uiT6Fqwg8rfUdXPA95Z/9bwLPkMJ8p1zwRlxBKjzICTGjB/NDLUYWrZVW+kXOOWrLHEluccrAc5mvWY1/k6KaxqYslanIPOj8j9/7sZJBMsvH8teHjRDGn402sCIBO3SUwthGKktLuAUL5MCiVgo/Eym4mQ2a4OAbZBWqKRQ+7HJunbEzwA/2zOUm/WX3NTy8dg67yyPNLXgMarVsmRXRDYPMlSGfV6Y3kBGizhEGy/u8zXe17KmPjqEKDLWHZZxt0wWYVidERLk1EG2Sm0maIV0i6a+wunCLqQXKHPF8BDwZGftYNbbrED7+4Jnp2h5Y8fS5FlpNAgPZp4YWbOhMpZIhahms3qwGloTGrCj+YvnUu6wnKOnhsvcz2Ibgi+pXr2/3H8lSjAg//P7wRYQN0pvIdacDRD0Vx10bENPAO2IKV7COv/NI0WLrBezDcRS4j60m4EgAdmambKye/mYqERY2P+2e1pMVcn4xaehXxfdyb5MGsZtIh7h0vP9LxVpj+mIVE/WDk36sWPVlTtumVioC5vhr087RrTOj3fNAjHeEMvJa5uiyKxT3UOCx6YORGHkH0i9fz/2QHCA2FBrOdTFv3oe1L2W23iqs9cSx+FxaVCE=