From aeaa51e951782a47b3b99015118f58160726c7a4 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 6 May 2017 00:05:45 -0700 Subject: [PATCH] add code coverage to CI. add codecov badge --- .gitignore | 4 +++- .travis.yml | 4 +++- README.md | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 113bd90..1f379ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .idea .packages -pubspec.lock \ No newline at end of file +pubspec.lock +coverage +__temp_coverage* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 0c829a2..0fe79ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,9 @@ before_script: - ./scripts/travis_setup.sh - ./flutter/bin/flutter doctor script: - - ./flutter/bin/flutter test + - ./flutter/bin/flutter test --coverage +after_success: + - bash <(curl -s https://codecov.io/bash) -t $CODE_COV_TOKEN cache: directories: - $HOME/.pub-cache \ No newline at end of file diff --git a/README.md b/README.md index 01177f9..6bbd8e5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Router [![Build Status](https://travis-ci.org/goposse/flutter-router.svg?branch=master)](https://travis-ci.org/goposse/flutter-router) +[![codecov](https://codecov.io/gh/goposse/flutter-router/branch/master/graph/badge.svg)](https://codecov.io/gh/goposse/flutter-router) ## Getting started