Skip to content

Commit

Permalink
Travis Updates (#21)
Browse files Browse the repository at this point in the history
- Set up goreleaser in the deploy block to fix the releases
- Better matrix on golang, with allowed failures on tip
- Added gofmt requirements to the test.
  • Loading branch information
issmirnov authored Sep 22, 2018
1 parent 437a66c commit 551d5f4
Showing 1 changed file with 37 additions and 13 deletions.
50 changes: 37 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,51 @@
# References:
# - https://blog.questionable.services/article/build-go-binaries-travis-ci-github/
# - https://goreleaser.com/ci/

language: go
sudo: false

go:
- "1.7"
- "1.8 "
- "1.9"
- "1.10"
- "1.11"
- "tip"
matrix:
include:
# "1.x" always refers to the latest Go version, inc. the patch release.
# e.g. "1.x" is 1.11 until 1.11.1 is available.
- go: 1.x
env: LATEST=true
- go: 1.7.x
- go: 1.8.x
- go: 1.9.x
- go: 1.10.x
- go: 1.11.x
- go: tip
allow_failures:
- go: tip

# https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system
os:
- linux
- osx

install:
- go get -t ./...
- go get -t -v ./...

# Only clone the most recent commit.
git:
depth: 1


script:
script:
- diff -u <(echo -n) <(gofmt -d .)
- go vet $(go list ./... | grep -v /vendor/)
- go test -short -v ./...
- go build -v ./...
- ./e2e.sh

after_success: |
test "$TRAVIS_OS_NAME" = "linux" -a -n "$TRAVIS_TAG" \
&& go get github.com/goreleaser/goreleaser \
&& goreleaser
# calls goreleaser
# https://docs.travis-ci.com/user/deployment
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
on:
tags: true
condition: $TRAVIS_OS_NAME = linux && $LATEST = true

0 comments on commit 551d5f4

Please sign in to comment.