From 1168d7b707de336efe2b54783abe4d415d37a4e4 Mon Sep 17 00:00:00 2001 From: Christian Haeusler Date: Sun, 24 Feb 2019 21:54:42 +0100 Subject: [PATCH] Enable Travis CI --- .codeclimate.yml | 20 ++++++++++++++++++++ .travis.yml | 25 +++++++++++++++++++++++++ Makefile | 2 +- README.adoc | 4 ++++ tag/tag_test.go | 2 ++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .codeclimate.yml create mode 100644 .travis.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..d68a3d5 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,20 @@ +version: "2" + +plugins: + gofmt: + enabled: true + golint: + enabled: true + govet: + enabled: true + fixme: + enabled: true + +exclude_patterns: + - "**/*.golden" + - "**/*.interp" + - "**/*.pb.go" + - "**/*.tokens" + - "**/path*_listener.go" + - "**/path_lexer.go" + - "**/path_parser.go" diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ad50c26 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: go + +go: + - "1.11" + +branches: + only: + - master + +env: + - GO111MODULE=on + +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: + - make deps + +script: + - make test + +after_script: + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT diff --git a/Makefile b/Makefile index 2ff8000..79492a1 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ deps: test: $(cover_file) $(cover_file): $(wildcard **/*_test.go) - go test -coverpkg=./... -covermode=atomic -coverprofile=$@ ./... + go test -covermode=atomic -coverprofile=$@ ./... .PHONY: build build: $(binary_name) diff --git a/README.adoc b/README.adoc index a5b3b6a..ad8f460 100644 --- a/README.adoc +++ b/README.adoc @@ -1,5 +1,9 @@ = Bilocation: a tool for managing files using tags instead of folders +image:https://travis-ci.org/corvus-ch/bilocation.svg?branch=master["Build Status", link="https://travis-ci.org/corvus-ch/bilocation"] +image:https://api.codeclimate.com/v1/badges/31917c2baffbbfa739c3/maintainability["Maintainability", link="https://codeclimate.com/github/corvus-ch/bilocation/maintainability"] +image:https://api.codeclimate.com/v1/badges/31917c2baffbbfa739c3/test_coverage["Test Coverage", link="https://codeclimate.com/github/corvus-ch/bilocation/test_coverage"] + This file should go into location _A_. But wait, it also belongs to location _B_. If you face this issue regularly while managing your files, `bilocation` is for you. diff --git a/tag/tag_test.go b/tag/tag_test.go index 29ed299..48d56e0 100644 --- a/tag/tag_test.go +++ b/tag/tag_test.go @@ -1,3 +1,5 @@ +// +build integration + package tag_test import (