Skip to content

Commit

Permalink
Add Go 1.12 to Travis CI (#174)
Browse files Browse the repository at this point in the history
Also update to the latest version of Makefile.common.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
  • Loading branch information
simonpasquier authored Mar 4, 2019
1 parent 7a3416f commit bf857fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
sudo: false

language: go
# Supported Go versions are synced with github.com/prometheus/client_golang.
go:
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x

script:
- make test
- if [[ $TRAVIS_GO_VERSION =~ ^1\.(11)\. ]]; then make style; fi
# style is only checked against the latest supported Go version.
- if [[ $TRAVIS_GO_VERSION =~ ^1\.(12)\. ]]; then make style; fi
8 changes: 4 additions & 4 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ else
GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)
endif

PROMU_VERSION ?= 0.2.0
PROMU_VERSION ?= 0.3.0
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
STATICCHECK_VERSION ?= 2019.1
STATICCHECK_URL := https://github.com/dominikh/go-tools/releases/download/$(STATICCHECK_VERSION)/staticcheck_$(GOHOSTOS)_$(GOHOSTARCH)
Expand All @@ -87,14 +87,14 @@ ifeq ($(GOHOSTARCH),amd64)
endif
endif

.PHONY: all
all: precheck style staticcheck unused build test

# This rule is used to forward a target like "build" to "common-build". This
# allows a new "build" target to be defined in a Makefile which includes this
# one and override "common-build" without override warnings.
%: common-% ;

.PHONY: common-all
common-all: precheck style check_license staticcheck unused build test

.PHONY: common-style
common-style:
@echo ">> checking code style"
Expand Down

0 comments on commit bf857fa

Please sign in to comment.