Check Bazel in Travis

This commit is contained in:
Stanisław Barzowski 2019-09-09 11:40:15 +02:00
parent ab95594eea
commit 0d5e73c8b0
2 changed files with 29 additions and 4 deletions

View File

@ -1,12 +1,22 @@
language: go
sudo: false
go:
- 1.x
- 1.8.x
- tip
matrix:
include:
- go: 1.x
- go: 1.8.x
- go: tip
- name: "Bazel Check"
go: 1.x
script: ./travisBazel.sh
before_install:
- echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
- curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
- sudo apt-get update && sudo apt-get install bazel
before_install:
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
- go get github.com/sergi/go-diff/diffmatchpatch
script: ./travisBuild.sh

15
travisBazel.sh Executable file
View File

@ -0,0 +1,15 @@
set -e
set -x
# See: https://github.com/bazelbuild/rules_go#how-do-i-run-bazel-on-travis-ci
bazel --host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
--spawn_strategy=standalone \
--genrule_strategy=standalone \
--test_strategy=standalone \
--local_resources=1536,1.5,0.5 \
--noshow_progress \
--verbose_failures \
--test_output=errors \
//:go_default_test