Skip to content

Commit

Permalink
travis
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Mar 9, 2018
1 parent edced40 commit 4da8ec1
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ group: edge
git:
depth: 1
script:
- make -e ci
- ./scripts/travis.sh

# calls goreleaser when a new tag is pushed
deploy:
Expand Down
17 changes: 1 addition & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,7 @@ install: ## install misspell into GOPATH/bin
go install ./cmd/misspell

build: hooks ## build and lint misspell
dep ensure
go install ./cmd/misspell
gometalinter \
--vendor \
--deadline=60s \
--disable-all \
--enable=vet \
--enable=golint \
--enable=gofmt \
--enable=goimports \
--enable=gosimple \
--enable=staticcheck \
--enable=ineffassign \
--exclude=/usr/local/go/src/net/lookup_unix.go \
./...
go test .
./scripts/build.sh

test: ## run all tests
go test .
Expand Down
18 changes: 18 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
set -ex
dep ensure
go install ./cmd/misspell
gometalinter \
--vendor \
--deadline=60s \
--disable-all \
--enable=vet \
--enable=golint \
--enable=gofmt \
--enable=goimports \
--enable=gosimple \
--enable=staticcheck \
--enable=ineffassign \
--exclude=/usr/local/go/src/net/lookup_unix.go \
./...
go test .
2 changes: 1 addition & 1 deletion scripts/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh -ex
make ci
./scripts/build.sh
10 changes: 10 additions & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# DEP
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

# GOMETALINTER
go get -u github.com/alecthomas/gometalinter && gometalinter --install

# remove the default misspell to make sure
rm -f `which misspell`
3 changes: 3 additions & 0 deletions scripts/travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
./scripts/setup.sh
./scripts/build.sh

0 comments on commit 4da8ec1

Please # to comment.