Skip to content

Commit 4891985

Browse files
author
Mattia Bertorello
committed
1 parent 051e243 commit 4891985

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

Diff for: .travis.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,26 @@ language: go
33
go:
44
- 1.11.x
55

6+
env:
7+
- DEP_VERSION="0.5.0"
8+
9+
# Anything in before_script that returns a nonzero exit code will flunk the
10+
# build and immediately stop. It's sorta like having set -e enabled in bash.
11+
# Make sure golangci-lint is vendored.
612
before_install:
7-
- go get -t -v ./...
813
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.2
9-
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
14+
# Download the binary to bin folder in $GOPATH
15+
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
16+
# Make the binary executable
17+
- chmod +x $GOPATH/bin/dep
1018

11-
script:
12-
- cd $GOPATH/src/github.com/arduino/arduino-cli
19+
install:
1320
# Check the dependency, -skip-lock may be useful because the version are not fixed but depends
1421
# from the branch master of the libraries so they change very often
1522
- dep check -skip-vendor
1623
- dep ensure
24+
25+
script:
1726
# Check if the code is formatted
1827
- $(exit $(go fmt ./... | wc -l))
1928
# Run linter
@@ -24,3 +33,7 @@ script:
2433

2534
after_success:
2635
- bash <(curl -s https://codecov.io/bash)
36+
37+
cache:
38+
directories:
39+
- $GOPATH/pkg/dep

0 commit comments

Comments
 (0)