diff --git a/.travis.yml b/.travis.yml
index 9e9acf2e7d8ef917a6031a3693327f744684966a..cf2f92942adb25ee2b21801d7a33fa6b6686650a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,25 +29,25 @@ matrix:
     env: PLUMED_CC=mpicc   PLUMED_CXX=mpic++     PLUMED_CXXFLAGS=-O3 LAPACK=yes
 # then I try serial compiler on UBUNTU precise
   - os: linux
-    if: branch =~ ^test-
+    if: branch =~ ^test- OR type IN pull_request
     dist: precise
     sudo: required
     env: PLUMED_CC=gcc   PLUMED_CXX=g++
 # test using external blas with internal lapack
   - os: linux
-    if: branch =~ ^test-
+    if: branch =~ ^test- OR type IN pull_request
     dist: trusty
     sudo: required
     env: PLUMED_CC=mpicc PLUMED_CXX=mpic++  PLUMED_CXXFLAGS=-O3 LAPACK=yes CONFIG_FLAGS="--disable-external-lapack"
 # test using docker image.
 # currently it means ubuntu 17, with gcc6
   - sudo: required
-    if: branch =~ ^test-
+    if: branch =~ ^test- OR type IN pull_request
     services: docker
     env: PLUMED_DOCKER=yes
 # osx serial
   - os: osx
-    if: branch =~ ^test-
+    if: branch =~ ^test- OR type IN pull_request
     osx_image: xcode7.3
     env: PLUMED_CC=clang PLUMED_CXX=clang++ PLUMED_CXXFLAGS=-O3
 # this should not be required. I add it since it looks like with OSX it does not work otherwise
@@ -56,7 +56,7 @@ matrix:
       - $HOME/.ccache
 # osx parallel
   - os: osx
-    if: branch =~ ^test-
+    if: branch =~ ^test- OR type IN pull_request
     osx_image: xcode7.3
     env: PLUMED_CC=mpicc PLUMED_CXX=mpic++  PLUMED_CXXFLAGS=-O3
 # this should not be required. I add it since it looks like with OSX it does not work otherwise
@@ -65,7 +65,7 @@ matrix:
       - $HOME/.ccache
 # osx serial macports
   - os: osx
-    if: branch =~ ^test-
+    if: branch =~ ^test- OR type IN pull_request
     osx_image: xcode7.3
     env: PLUMED_MACPORTS="plumed"
     cache:
@@ -73,7 +73,7 @@ matrix:
       - $HOME/.macports-ci-ccache
 # osx serial macports debug variant
   - os: osx
-    if: branch =~ ^test-
+    if: branch =~ ^test- OR type IN pull_request
     osx_image: xcode7.3
     env: PLUMED_MACPORTS="plumed +allmodules"
     cache: