-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |