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
Showing
8 changed files
with
86 additions
and
69 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,21 +1,15 @@ | ||
language: go | ||
go: | ||
- 1.12.x | ||
- 1.13.4 | ||
- 1.13.x | ||
- 1.14 | ||
install: | ||
- go get github.com/mattn/goveralls | ||
- go get honnef.co/go/tools/cmd/staticcheck | ||
- go get github.com/client9/misspell/cmd/misspell | ||
- go get -t ./... | ||
- ./scripts/install-checks.sh | ||
before_script: | ||
- PACKAGES=$(go list ./...) | ||
- go get -d ./... | ||
- if [[ "$TRAVIS_GO_VERSION" =~ ^1\.14(\.[0-9]+)?$ ]]; then ./scripts/check.sh; fi | ||
- go build | ||
- $(exit $(go fmt $PACKAGES | wc -l)) | ||
- go vet $PACKAGES | ||
- misspell -error -locale US . | ||
- staticcheck $PACKAGES | ||
- if [[ "$TRAVIS_GO_VERSION" =~ ^1\.13\. ]] && [ "$TRAVIS_TAG" != "" ]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi | ||
- if [[ "$TRAVIS_GO_VERSION" =~ ^1\.14(\.[0-9]+)?$ ]] && [ "$TRAVIS_TAG" != "" ]; then ./scripts/cross_compile.sh $TRAVIS_TAG; fi | ||
script: | ||
- if [[ "$TRAVIS_GO_VERSION" =~ ^1\.13\. ]]; then ./scripts/cover.sh TRAVIS; else go test -v -race $PACKAGES; fi | ||
- if [[ "$TRAVIS_GO_VERSION" =~ ^1\.14(\.[0-9]+)?$ ]]; then ./scripts/cover.sh TRAVIS; else go test -v -race $PACKAGES; fi | ||
after_success: | ||
- if [[ "$TRAVIS_GO_VERSION" =~ ^1\.13\. ]] && [ "$TRAVIS_TAG" != "" ]; then ghr --owner resgateio --token $GITHUB_TOKEN --draft --replace $TRAVIS_TAG pkg/; fi | ||
- if [[ "$TRAVIS_GO_VERSION" =~ ^1\.14(\.[0-9]+)?$ ]] && [ "$TRAVIS_TAG" != "" ]; then ghr --owner resgateio --token $GITHUB_TOKEN --draft --replace $TRAVIS_TAG pkg/; fi |
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash -e | ||
# Run from directory above via ./scripts/check.sh | ||
|
||
echo "Checking formatting..." | ||
if [ -n "$(gofmt -s -l .)" ]; then | ||
echo "Code is not formatted. Run 'gofmt -s -w .'" | ||
exit 1 | ||
fi | ||
echo "Checking with go vet..." | ||
go vet ./... | ||
echo "Checking with staticcheck..." | ||
staticcheck ./... | ||
echo "Checking with golint..." | ||
golint -set_exit_status ./... | ||
echo "Checking with misspell..." | ||
misspell -error -locale US . |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -e | ||
|
||
pushd /tmp > /dev/null | ||
go get -u github.com/mattn/goveralls | ||
go get -u honnef.co/go/tools/cmd/staticcheck | ||
go get -u golang.org/x/lint/golint | ||
go get -u github.com/client9/misspell/cmd/misspell | ||
popd > /dev/null |
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
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
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
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