Browse Source

add code coverage to CI. add codecov badge

Luke 8 years ago
parent
commit
aeaa51e951
3 changed files with 7 additions and 2 deletions
  1. 3 1
      .gitignore
  2. 3 1
      .travis.yml
  3. 1 0
      README.md

+ 3 - 1
.gitignore

@@ -1,3 +1,5 @@
 .idea
 .packages
-pubspec.lock
+pubspec.lock
+coverage
+__temp_coverage*

+ 3 - 1
.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

+ 1 - 0
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