From 8a6af08b27b6c6851f566f7c1106cb221ee85d86 Mon Sep 17 00:00:00 2001 From: Rob De Feo Date: Tue, 30 Apr 2019 08:13:16 +0100 Subject: [PATCH 1/5] build only tg --- .goreleaser.yml | 7 +++++++ .travis.yml | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index e4258c3c4..4e263f1a0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,6 +2,13 @@ # Make sure to check the documentation at http://goreleaser.com env: - GO111MODULE=on +before: + hooks: + # you may remove this if you don't use vgo + - go mod download + - go install github.com/golang/mock/mockgen + # you may remove this if you don't need go generate + - go generate ./... builds: - id: mailchain-darwin-amd64 ldflags: -s -w -X github.com/mailchain/mailchain/pkg/version.Version={{.Version}} -X github.com/mailchain/mailchain/pkg/version.BuildDate={{.Date}} -X github.com/mailchain/mailchain/pkg/version.CommitHash={{ .ShortCommit }} diff --git a/.travis.yml b/.travis.yml index 1aa6e886a..768e9b557 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,16 @@ language: go go_import_path: github.com/mailchain/mailchain -go: - - 1.11.x - - 1.12.x +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.11.x + - go: 1.12.x + - go: tip + allow_failures: + - go: tip env: - GO111MODULE=on dist: xenial @@ -12,10 +20,11 @@ install: true script: - go test -covermode=count -coverprofile=coverage.out ./... - $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci - - git diff deploy: - provider: script - skip_cleanup: true - script: git diff && docker run --rm --privileged -v $TRAVIS_BUILD_DIR:/go/src/github.com/mailchain/mailchain -v /var/run/docker.sock:/var/run/docker.sock -w /go/src/github.com/mailchain/mailchain mailchain/goreleaser-xcgo goreleaser --rm-dist + script: docker run --rm --privileged -v $TRAVIS_BUILD_DIR:/go/src/github.com/mailchain/mailchain -v /var/run/docker.sock:/var/run/docker.sock -w /go/src/github.com/mailchain/mailchain mailchain/goreleaser-xcgo goreleaser --rm-dist on: tags: true + repo: mailchain/mailchain + branch: master + condition: $LATEST = true From 818d8de253cf7250229b2ebfc5137cbbbf8fc519 Mon Sep 17 00:00:00 2001 From: Rob De Feo Date: Tue, 30 Apr 2019 08:34:32 +0100 Subject: [PATCH 2/5] test too --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 768e9b557..938b2fed3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,11 @@ matrix: env: - GO111MODULE=on dist: xenial -before_install: +after_install: - go get github.com/mattn/goveralls install: true script: + - go test ./... - go test -covermode=count -coverprofile=coverage.out ./... - $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci deploy: From 9dbd959c4760f90afc7d8d455cafbf1cf185d24d Mon Sep 17 00:00:00 2001 From: Rob De Feo Date: Tue, 30 Apr 2019 08:42:56 +0100 Subject: [PATCH 3/5] install properly --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 938b2fed3..64467edf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,11 +14,10 @@ matrix: env: - GO111MODULE=on dist: xenial -after_install: - - go get github.com/mattn/goveralls -install: true +install: + - go get -v ./... script: - - go test ./... + - go get github.com/mattn/goveralls - go test -covermode=count -coverprofile=coverage.out ./... - $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci deploy: From 3ffc95a23a82e37f1831dd9e397b2e6f104f18e3 Mon Sep 17 00:00:00 2001 From: Rob De Feo Date: Wed, 1 May 2019 08:15:27 +0100 Subject: [PATCH 4/5] make 1.12.x latest --- .goreleaser.yml | 2 -- .travis.yml | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 4e263f1a0..cbfc63bdd 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -4,10 +4,8 @@ env: - GO111MODULE=on before: hooks: - # you may remove this if you don't use vgo - go mod download - go install github.com/golang/mock/mockgen - # you may remove this if you don't need go generate - go generate ./... builds: - id: mailchain-darwin-amd64 diff --git a/.travis.yml b/.travis.yml index 64467edf4..2795fc31e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,10 @@ language: go go_import_path: github.com/mailchain/mailchain 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: tip - go: 1.11.x - go: 1.12.x - - go: tip + env: LATEST=true allow_failures: - go: tip env: From 474b9dedb440282cd17f24cf7aed54addcdc838e Mon Sep 17 00:00:00 2001 From: Rob De Feo Date: Wed, 1 May 2019 08:19:35 +0100 Subject: [PATCH 5/5] set env on latest version explicitly --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2795fc31e..5c2f47320 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,15 @@ language: go go_import_path: github.com/mailchain/mailchain matrix: include: - - go: tip + # "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 + - GO111MODULE=on - go: 1.11.x - go: 1.12.x - env: LATEST=true + - go: tip allow_failures: - go: tip env: