diff --git a/.travis.yml b/.travis.yml
index 4cf50a9b8ac3b4a0d2b17afcd9e6c66dd8c08791..194626512c96709a2da2b0a9d40cd58a22e45f1c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,19 +29,19 @@ matrix:
     env: PLUMED_CC=mpicc   PLUMED_CXX=mpic++     PLUMED_CXXFLAGS=-O3 LAPACK=yes
 # 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
@@ -50,7 +50,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
@@ -59,7 +59,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:
@@ -67,7 +67,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: