Skip to content

Commit

Permalink
Use go modules
Browse files Browse the repository at this point in the history
Travis: Define build matrix to switch download command

AppVeyor: Define GO111MODULE and cache module directory
  • Loading branch information
nukosuke committed Mar 13, 2019
1 parent dcd5283 commit b5abf89
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
26 changes: 18 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
language: go

go:
- 1.9
- 1.10.x
- 1.11.x
- 1.12.x
- master
matrix:
include:
- go: 1.9
- go: 1.10.x
- go: 1.11.x
env: GO111MODULE=on
- go: 1.12.x
env: GO111MODULE=on
- go: master
env: GO111MODULE=on

before_install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- if [ $GO111MODULE != "on" ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh;
fi
- go get github.com/mattn/goveralls # for profiling coverage

install:
- dep ensure
- if [ $GO111MODULE == "on" ]; then
go mod download;
else
dep ensure;
fi

script:
- go test -v ./...
Expand Down
11 changes: 7 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
build: off

clone_folder: c:\gopath\src\github.com\nukosuke\go-zendesk
clone_folder: c:\github.com\nukosuke\go-zendesk

environment:
GOPATH: c:\gopath
GO111MODULE: on

cache:
- '%LocalAppData%\go-build'
- '%GOPATH%\pkg\mod'

stack: go 1.11

install:
- go get -u github.com/golang/dep/...
- set PATH=%PATH%;%GOPATH%\bin
- dep ensure
- go mod download

before_test:
- go vet ./...
Expand Down

0 comments on commit b5abf89

Please sign in to comment.