diff --git a/.travis.yml b/.travis.yml
index b7a0fe34225fb1604173898b4e3400ad8721edbe..2ce7ffde470b6691b103447fd062d5e8c6c625bb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -133,6 +133,7 @@ install:
   - if test "$MAKEDOC" == yes ; then sudo apt-get install -y doxygen-latex ; fi
 # install lcov
   - if test "$MAKECOVERAGE" == yes ; then ./.travis/install.lcov v1.13 ; fi
+  - if test "$MAKECOVERAGE" == yes ; then pip install --user cpp-coveralls ; fi
 # install numpy and cython for python interface
 # only for linux and homebrew (no macports)
   - if test "$PLUMED_CXX" ; then
@@ -221,3 +222,6 @@ script:
 after_success:
   - if test "$MAKEDOC" == yes ; then ./.travis/push doc ; fi 
   - if test "$MAKECOVERAGE" == yes ; then ./.travis/push coverage ; fi 
+  - if test "$MAKECOVERAGE" == yes ; then
+      coveralls -r src --gcov-options '\-lp' -E ".*/.*/.*.h" --exclude lapack --exclude blas --exclude molfile --exclude lepton ; 
+    fi