-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add lint, unit and build to make script and travis
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
- Loading branch information
1 parent
d89af5f
commit a5e2d3d
Showing
14 changed files
with
113 additions
and
45 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,3 +1,3 @@ | ||
FRITZBox 7490 | ||
vendor | ||
trials | ||
dist |
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,27 @@ | ||
language: go | ||
branches: | ||
only: | ||
- master | ||
|
||
sudo: required | ||
|
||
go: | ||
- 1.9 | ||
|
||
install: | ||
- make install/golint | ||
|
||
matrix: | ||
include: | ||
- script: make $TASK | ||
env: TASK="build/linux-arm" | ||
- script: make $TASK | ||
env: TASK="build/linux-amd64" | ||
- script: make $TASK | ||
env: TASK="build/macos-amd64" | ||
- script: make $TASK | ||
env: TASK="test/lint" | ||
- script: make $TASK | ||
env: TASK="test/unit" | ||
- script: make $TASK | ||
env: TASK="test/vet" |
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,35 @@ | ||
#!/bin/bash | ||
|
||
build/linux-arm: | ||
@GOOS=linux GOARCH=arm go build -o dist/linux-arm/hkfritz main.go | ||
|
||
build/linux-amd64: | ||
@GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/hkfritz main.go | ||
|
||
build/macos-amd64: | ||
@GOOS=darwin GOARCH=amd64 go build -o dist/macos-amd64/hkfritz main.go | ||
|
||
run: | ||
@go run main.go serve | ||
|
||
test/unit : | ||
@go test -v -i $(shell go list ./... | grep -v '/vendor/') | ||
@go test -v $(shell go list ./... | grep -v '/vendor/') | ||
|
||
test/vet: | ||
@go vet $(shell go list ./... | grep -v '/vendor/') | ||
|
||
test/fmt: | ||
@go fmt $(shell go list ./... | grep -v '/vendor/') | ||
|
||
test/lint: | ||
@for package in $(shell go list ./... | grep -v '/vendor/' | grep -v '/api' | grep -v '/server/internal'); do \ | ||
golint -set_exit_status $$package $$i || exit 1; \ | ||
done | ||
|
||
install/golint: | ||
@go get -u github.com/golang/lint/golint | ||
|
||
install/goreleaser: | ||
@go get github.com/goreleaser/goreleaser | ||
|
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
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
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