Makefile導入 #28

Merged
merged 8 commits into from May 4, 2017
View
@@ -0,0 +1,30 @@
+COVERAGE = coverage.out
+
+all: build
+
+.PHONY: deps
+deps:
+ go get github.com/mattn/goveralls
+
+.PHONY: build
+build:
+ go build
+
+.PHONY: fmt
+fmt:
+ gofmt -s -w $$(git ls-files | grep -e '\.go$$' | grep -v -e vendor)
+
+.PHONY: test
+test:
+ go test -v ./...
+
+.PHONY: cover
+cover:
+ go test -v -cover -race -coverprofile=${COVERAGE}
+
+.PHONY: vet
+vet:
+ go tool vet --all *.go
+
+.PHONY: test-all
+test-all: vet test
View
@@ -47,6 +47,7 @@ To see the detail options, type `./go-easy-first eval --help`.
- [ ] Implement PP-Attachment features
- [ ] Beam search with max-violation perceptron
- [ ] Mini-batch update
+- [ ] Embed weight parameters to a built binary file using go-bindata
# Author
Yasuhisa Yoshida
View
@@ -4,10 +4,9 @@ machine:
test:
pre:
- - go get github.com/mattn/goveralls
+ - make deps
override:
- - go test -v ./...
- test `gofmt -l . | wc -l` = 0
- - go test -v -cover -race -coverprofile=/home/ubuntu/coverage.out
+ - make cover COVERAGE='/home/ubuntu/coverage.out'
post:
- /home/ubuntu/.go_workspace/bin/goveralls -coverprofile=/home/ubuntu/coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
View
@@ -2,12 +2,13 @@ package main
import (
"fmt"
- "github.com/codegangsta/cli"
- "github.com/olekukonko/tablewriter"
"math/rand"
"os"
"runtime"
"time"
+
+ "github.com/codegangsta/cli"
+ "github.com/olekukonko/tablewriter"
)
func shuffle(data []*Sentence) {