Skip to content

Commit

Permalink
travis up to go 1.11
Browse files Browse the repository at this point in the history
more travis tweaks

adding link for pre-build process

goveralls is out for now, also test fixes for older jar strategy

bump them timeouts

adding coveralls but ignore if it fails

Adding back the coveralls env var
  • Loading branch information
jeffbean authored and nemith committed Jul 27, 2019
1 parent c1394f4 commit 845d93d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.vscode/
.DS_Store
profile.cov
zookeeper
zookeeper-*/
zookeeper-*.tar.gz
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: go
go:
- 1.10
go_import_path: github.com/samuel/go-zookeeper/zk
- 1.11

go_import_path: github.com/samuel/go-zookeeper

jdk:
- oraclejdk9
Expand All @@ -23,11 +24,11 @@ before_script:
script:
- jdk_switcher use oraclejdk9
- go build ./...
- go test -i -race ./...
- go test -race -covermode atomic -coverprofile=profile.cov
- goveralls -coverprofile=profile.cov -service=travis-ci
- make test

env:
global:
secure: Coha3DDcXmsekrHCZlKvRAc+pMBaQU1QS/3++3YCCUXVDBWgVsC1ZIc9df4RLdZ/ncGd86eoRq/S+zyn1XbnqK5+ePqwJoUnJ59BE8ZyHLWI9ajVn3fND1MTduu/ksGsS79+IYbdVI5wgjSgjD3Ktp6Y5uPl+BPosjYBGdNcHS4=
matrix:
- zk_version=3.5.4-beta
- zk_version=3.4.12
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
# make file to hold the logic of build and test setup
ZK_VERSION ?= 3.5.4-beta
ZK_VERSION ?= 3.4.12

ZK = zookeeper-$(ZK_VERSION)
ZK_URL = "https://archive.apache.org/dist/zookeeper/$(ZK)/$(ZK).tar.gz"

$(ZK):
wget $(ZK_URL)
tar -zxf $(ZK).tar.gz
rm $(ZK).tar.gz
# we link to a standard directory path so then the tests dont need to find based on version
ln -s $(ZK) zookeeper
# in older versions we use the zk fatjar and need to remove the signature from the jar to run it.
-zip -d zookeeper/contrib/fatjar/zookeeper-${zk_version}-fatjar.jar 'META-INF/*.SF' 'META-INF/*.DSA'


.PHONY: install-test-deps
install-test-deps:
go get github.com/mattn/goveralls
go get golang.org/x/tools/cmd/cover

.PHONY: travis
travis: $(ZK) install-test-deps
travis: $(ZK) install-test-deps

.PHONY: test
test:
go test -timeout 120s -v ./...
go test -timeout 300s -v -i -race ./...
go test -timeout 300s -v -race -covermode atomic -coverprofile=profile.cov ./zk
# ignore if we fail to publish coverage
-goveralls -coverprofile=profile.cov -service=travis-ci

0 comments on commit 845d93d

Please sign in to comment.