diff --git a/.gitignore b/.gitignore index 532aba1f..9d89defa 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ vendor/*/ bindata_assetfs.go selenoid-ui data +coverage.txt .DS_Store dist/** diff --git a/.travis.yml b/.travis.yml index f51216b8..8e996204 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: script: - go generate ./web ./... - - ./travis/coverage.sh + - go test -race -v -coverprofile=coverage.txt -covermode=atomic ./... - gox -os "linux darwin windows" -arch "amd64" -osarch="windows/386" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD`" - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD`" # for docker @@ -21,7 +21,7 @@ before_install: - rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/${TRAVIS_REPO_SLUG}/ - export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/${TRAVIS_REPO_SLUG} - cd $HOME/gopath/src/github.com/${TRAVIS_REPO_SLUG} - - eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.9 bash)" + - eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.10.x bash)" install: - go get -u github.com/jteeuwen/go-bindata/... diff --git a/travis/coverage.sh b/travis/coverage.sh deleted file mode 100755 index 34041a4e..00000000 --- a/travis/coverage.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "mode: atomic" > coverage.txt - -for d in $(go list ./... | grep -v vendor); do - go test -race -coverprofile=profile.out -covermode=atomic $d - if [ -f profile.out ]; then - cat profile.out | grep -v "mode: atomic" >> coverage.txt - rm profile.out - fi -done