Skip to content

Commit

Permalink
Travis optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed May 1, 2019
2 parents fa915b2 + 32c39f8 commit d14ea9d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,21 @@ services:
- docker

install:
- bash tests/prepare.sh
- test -n "$TRAVIS_TAG" || bash tests/prepare.sh

script:
- go test -v -covermode=count -coverprofile=coverage.out ./...
- test -n "$TRAVIS_TAG" || go test -v -covermode=count -coverprofile=coverage.out ./...

after_script:
# Install and upload test coverage must not failure for test build
- go get -mod= golang.org/x/tools/cmd/cover
- go get -mod= github.com/mattn/goveralls
- goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
- test -n "$TRAVIS_TAG" || go get -mod= golang.org/x/tools/cmd/cover
- test -n "$TRAVIS_TAG" || go get -mod= github.com/mattn/goveralls
- test -n "$TRAVIS_TAG" || goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN

before_deploy:
- git config --local user.name "$GIT_NAME"
- git config --local user.email "$GIT_EMAIL"
- export TRAVIS_TAG="$TAG_PREFIX.$TRAVIS_BUILD_NUMBER"
- BUILD_TIME=$(TZ=UTC date --rfc-3339=seconds | cut -d '+' -f 1 | tr -d - | tr ' ' '-' | tr -d :)
- git tag $TRAVIS_TAG
- go get -mod= github.com/mitchellh/gox
- mkdir -p output
- OS_ARCH_BUILDS="darwin/amd64 linux/386 linux/amd64 linux/arm freebsd/386 freebsd/amd64 freebsd/arm windows/386 windows/amd64"
Expand All @@ -41,7 +39,6 @@ before_deploy:
deploy:
skip_cleanup: true
provider: releases
tags: true
on:
repo: rekby/lets-proxy2
tags: true
Expand Down

0 comments on commit d14ea9d

Please sign in to comment.