Skip to content

Commit

Permalink
Update travis file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Andres Virviescas Santana committed Jun 17, 2020
1 parent b34de54 commit 1d2f2c5
Showing 1 changed file with 27 additions and 33 deletions.
60 changes: 27 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
language: go
sudo: false
go:
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- tip

os:
- linux
- osx
- windows

go:
- 1.14.x
- 1.13.x
- 1.12.x
- 1.11.x
- tip

before_install:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
- go get -v ./...
before_script:
- go get -t -v ./...

script:
# lint (go version >= 1.11, gotip not supported)
- |
if [[ $(go version | awk '{print $3}') =~ ^go1.1[1-9]$ ]]; then
golangci-lint run
fi
- go test -v -cover -race ./...

# build test for supported platforms
- GOOS=linux go build ./...
- GOOS=darwin go build ./...
- GOOS=freebsd go build ./...
- GOOS=windows go build ./...
- |
if [[ $(uname) == Darwin ]]; then
# Last supported version for GOOS=386 is go1.14 in Darwin
if [[ $(go version | awk '{print $3}') =~ ^go1\.(9|10|11|12|13|14)$ ]]; then
GOARCH=386 go build ./...
fi
else
GOARCH=386 go build ./...
fi
jobs:
allow_failures:
- go: tip

# run tests
- go test -v -cover -race ./...
include:
- stage: lint
script:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
- golangci-lint run

- stage: cross compilation
script:
- GOOS=linux go build
- GOOS=darwin go build
- GOOS=freebsd go build
- GOOS=windows go build
- GOARCH=386 go build

0 comments on commit 1d2f2c5

Please # to comment.