Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sudo: false

os: linux

language: go
go:
- 1.7
- tip

matrix:
fast_finish: true
allow_failures:
- go: tip

env:
- GO15VENDOREXPERIMENT="0"

before_install: cd cli

script:
- "../scripts/test-go-fmt.sh"

notifications:
flowdock:
secure: "R+oCTutMLINYW1LZpZK14JjkU0Tt2UTc47q+MXKRruDwCp3ntx4RL9GtSp9cg0EHIXPvQ8yesBKIgpZjw3eelAORXzG8FTgvjPH0mu3m1lU20cE3XKHE4+kH0hNLpXQ2V20vj4XnMGmCPizG2GXDBl/LZcAUPoAZy6j+++cTvQRcIkGede9aUCsI5hBRLwdKVqD2lGC+Qr32VZNAcHsNaVHkhR6WustetRIMx3vQSlZWvd8SOaGvWkaBw8nBpPlfnG4bl28kWH9aoJyILyAuNZtz42C5JDCkcq0XjvUOWtXwwGEutKJX5OF77l5lccpRVDYoW+L1xXMrBaYje1+gs0lEUrrJj14yIVLw6gOlumYsmKWNdKob2lDCAL9w3IeQ4VfrAWXYY6M6WTIA6/3SANokgrXwtsV4/rYbtiNsyZA5QB1w32XH+GSjTYRTbMboIoB6kvABN7Y/saX/ShdZn4UgShTkYxckQNytsgvZWAZVdR0QpGzm7CLT2fLNLcb6Z1WdcNJAmSMlR417BwCG8aHUEeCDAGhn1p0mYcE+UiBizYOa9o0HkfcznXyl0YZhybtWj/ZFlX8TTS5fKhYYkTqcGdEYMBFxGAH7mL0Pu2D1j9oclXWeYIEXGpOFRhs0d7X6e5GA9O7rW/mDiirff3FI+4ts6aq1xY+z6hkTayY="
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
# Build rig, dropping off a working binary in build/darwin/rig.
compile:
extends: base
command: gox -osarch="Darwin/amd64" -output="build/{{.OS}}/rig"
command: gox -osarch="Darwin/amd64" -output="../build/{{.OS}}/rig"

# Install project dependencies.
install:
Expand All @@ -29,4 +29,4 @@ services:
# temporary/brittle workaround.
- /data/golang/cache:${OUTRIGGER_GOPATH:-/go}/src
- .:${OUTRIGGER_GOPATH:-/go}/src/github.com/phase2/rig
working_dir: ${OUTRIGGER_GOPATH:-/go}/src/github.com/phase2/rig
working_dir: ${OUTRIGGER_GOPATH:-/go}/src/github.com/phase2/rig/cli
16 changes: 16 additions & 0 deletions scripts/test-go-fmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env sh
##
# Test go fmt
#
# Test if the codebase has valid go formatting.
#
# @see https://github.com/limetext/lime/pull/265/files
##

fmt="$(find . ! \( -path './3rdparty' -prune \) -type f -name '*.go' -print0 | xargs -0 gofmt -l )"

if [ -n "$fmt" ]; then
echo "Unformatted Go source code:"
echo "$fmt"
exit 1
fi