]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commitdiff
coveralls: Adding Travis CI integration
authorJoe Richey joerichey@google.com <joerichey@google.com>
Wed, 19 Jul 2017 23:55:43 +0000 (16:55 -0700)
committerJoe Richey joerichey@google.com <joerichey@google.com>
Thu, 20 Jul 2017 00:42:38 +0000 (17:42 -0700)
.travis.yml
Makefile

index 2a186aacb40ad7f7f6118d4092da2b4c4fcc5763..f530e1e12baee2ae4ac133a1334880c87046f49c 100644 (file)
@@ -17,8 +17,7 @@ addons:
       - git # Needed to stop git from getting deleted
 
 install:
-  - make go-tools
-  - make test-setup
+  - make travis-install
 
 script:
-  - make check
+  - make travis-script
index e2f0bd9420879bce3ea64b32c70f03e52f78d31d..24f37eecb4f7e76a5ab8aa6454bce26a42853e7d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -110,11 +110,18 @@ update:
        @govendor remove +unused
 
 # Format all the Go and C code
-.PHONY: format
+.PHONY: format format-check
 format:
        @gofmt -l -s -w $(GO_FILES)
        @clang-format -i -style=Google $(C_FILES)
 
+format-check:
+       @gofmt -s -d $(GO_FILES) \
+       | ./input_fail.py "Incorrectly formatted Go files. Run \"make format\"."
+       @clang-format -i -style=Google -output-replacements-xml $(C_FILES) \
+       | grep "<replacement " \
+       | ./input_fail.py "Incorrectly formatted C files. Run \"make format\"."
+
 # Run lint rules (skipping generated files)
 .PHONY: lint
 lint:
@@ -155,14 +162,12 @@ test-teardown:
        sudo rmdir $(MOUNT)
        rm -f $(IMAGE)
 
-##### Commands for Travis CI #####
+##### Travis CI Commands
+.PHONY: travis-setup travis-script
+travis-install: go-tools test-setup
+       go get -u github.com/mattn/goveralls
 
-.PHONY: check
-check: lint default test
+travis-script: lint format-check default
+       goveralls -service=travis-ci
        @govendor list +missing +external +unused \
        | ./input_fail.py "Incorrect vendored dependencies. Run \"make update\"."
-       @gofmt -s -d $(GO_FILES) \
-       | ./input_fail.py "Incorrectly formatted Go files. Run \"make format\"."
-       @clang-format -i -style=Google -output-replacements-xml $(C_FILES) \
-       | grep "<replacement " \
-       | ./input_fail.py "Incorrectly formatted C files. Run \"make format\"."