This repository has been archived by the owner on Jan 4, 2019. It is now read-only.
forked from abourget/slick
-
Notifications
You must be signed in to change notification settings - Fork 8
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
2 changed files
with
36 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: go | ||
|
||
# Always use a string here, floats can result in unintended consequences | ||
go: | ||
- "1.11.x" | ||
|
||
stages: | ||
- name: "Testing" # Fires every time | ||
- name: "Build" | ||
if: branch = master | ||
- name: "Deploy" | ||
if: branch = master | ||
|
||
jobs: | ||
include: | ||
- stage: "Testing" | ||
name: "Pre-commit" | ||
script: | ||
- ./scripts/pre-commit.sh |
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,17 @@ | ||
#!/bin/sh | ||
|
||
GOFMT_FILES=$(gofmt -l .) | ||
if [ -n "${GOFMT_FILES}" ]; then | ||
printf >&2 'gofmt failed for the following files:\n%s\n\nplease run "gofmt -w ." on your changes before committing.\n' "${GOFMT_FILES}" | ||
exit 1 | ||
fi | ||
|
||
GOVET_ERRORS=$(go tool vet *.go 2>&1) | ||
if [ -n "${GOVET_ERRORS}" ]; then | ||
printf >&2 'go vet failed for the following reasons:\n%s\n\nplease run "go tool vet *.go" on your changes before committing.\n' "${GOVET_ERRORS}" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${NOTEST}" ]; then | ||
go test -v -short ./... | ||
fi |