diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..94c3524 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,10 @@ +engines: + gofmt: + enabled: true + golint: + enabled: true + checks: + GoLint/Comments/PackageComments: + enabled: false + govet: + enabled: true diff --git a/.gitignore b/.gitignore index e0170a5..ea58090 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,11 @@ -/dep -/testdep -/profile.out -/coverage.txt +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out diff --git a/.travis.yml b/.travis.yml index 1456363..a63efa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,22 @@ go: - 1.9 - tip +env: + global: + - CC_TEST_REPORTER_ID=68feaa3410049ce73e145287acbcdacc525087a30627f96f04e579e75bd71c00 + +before_script: + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + - chmod +x ./cc-test-reporter + - ./cc-test-reporter before-build + install: - go get github.com/go-task/task/cmd/task script: - task dl-deps - task lint -- task test +- task test-coverage + +after_script: + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT diff --git a/Taskfile.yml b/Taskfile.yml index 0e4f1cf..f803564 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -25,3 +25,8 @@ test: desc: Runs go tests cmds: - go test -race . + +test-coverage: + desc: Runs go tests and calucates test coverage + cmds: + - go test -coverprofile=c.out .