add coverage info
diff --git a/README.md b/README.md
index b556851..33670eb 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
A library to reflect on the local pub cache.
[![Build Status](https://travis-ci.org/dart-lang/pub_cache.svg)](https://travis-ci.org/dart-lang/pub_cache)
+[![Coverage Status](https://img.shields.io/coveralls/dart-lang/pub_cache.svg)](https://coveralls.io/r/dart-lang/pub_cache?branch=master)
## Features and bugs
diff --git a/tool/travis.sh b/tool/travis.sh
index cb51e39..003f83c 100755
--- a/tool/travis.sh
+++ b/tool/travis.sh
@@ -15,3 +15,13 @@
# Run the tests.
dart test/all.dart
+
+# Install dart_coveralls; gather and send coverage data.
+if [ "$COVERALLS_TOKEN" ]; then
+ pub global activate dart_coveralls
+ pub global run dart_coveralls report \
+ --token $COVERALLS_TOKEN \
+ --retry 2 \
+ --exclude-test-files \
+ test/all.dart
+fi