From 91bfd334cc05853562d3ecaa078b50a609e74827 Mon Sep 17 00:00:00 2001 From: Azareal Date: Mon, 30 Jul 2018 16:04:26 +1000 Subject: [PATCH] Added the build status to the README, people seem to like these badges, very fashionable. --- .travis.yml | 3 ++- README.md | 2 +- main.go | 2 +- run-linux-tests | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 05162db8..e0f53e52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,7 @@ before_script: - ./cc-test-reporter before-build script: ./run-linux-tests after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT + - ./cc-test-reporter format-coverage --input-type gocov cover.out + - ./cc-test-reporter upload-coverage addons: mariadb: '10.0' \ No newline at end of file diff --git a/README.md b/README.md index e85a7b75..ee69b044 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Gosora [![Azareal's Discord Chat](https://img.shields.io/badge/style-Invite-7289DA.svg?style=flat&label=Discord)](https://discord.gg/eyYvtTf) +# Gosora ![Build Status](https://travis-ci.org/Azareal/Gosora.svg?branch=master) [![Azareal's Discord Chat](https://img.shields.io/badge/style-Invite-7289DA.svg?style=flat&label=Discord)](https://discord.gg/eyYvtTf) A super fast forum software written in Go. You can talk to us on our Discord chat! diff --git a/main.go b/main.go index 215a8d05..210303f9 100644 --- a/main.go +++ b/main.go @@ -323,7 +323,7 @@ func main() { } else if event.Op&fsnotify.Create == fsnotify.Create { log.Println("new file:", event.Name) err = modifiedFileEvent(event.Name) - } // Travis is being stupid, does this fix it + } if err != nil { common.LogError(err) } diff --git a/run-linux-tests b/run-linux-tests index 3ebe7c4f..d1932ff1 100644 --- a/run-linux-tests +++ b/run-linux-tests @@ -1,4 +1,4 @@ echo "Generating the dynamic code" go generate echo "Running tests" -go test +go test -coverprofile=cover.out