diff --git a/.travis.yml b/.travis.yml index 4bd98a59..14d56ff1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,12 @@ -jobs: - include: - - sudo: required - services: - - docker - language: generic - before_install: docker pull carto/nodejs-xenial-pg101:latest - script: npm run docker-test -- 10.15.1 +language: generic +sudo: required +env: + matrix: + - NODE_VERSION=10.15.1 + DOCKER_IMAGE=carto/nodejs-xenial-pg101:latest + - NODE_VERSION=10.15.1 + DOCKER_IMAGE=carto/nodejs-xenial-pg1121:latest +services: + - docker +before_install: docker pull ${DOCKER_IMAGE} +script: npm run docker-test -- ${DOCKER_IMAGE} ${NODE_VERSION} diff --git a/docker-test.sh b/docker-test.sh index 58e26b8a..c1d7995c 100755 --- a/docker-test.sh +++ b/docker-test.sh @@ -1,4 +1,4 @@ #!/bin/bash -docker run -e "NODEJS_VERSION=${1}" -v `pwd`:/srv carto/nodejs-xenial-pg1121:latest bash test/run_tests_docker.sh && \ +docker run -e "NODEJS_VERSION=${2}" -v `pwd`:/srv ${1} bash test/run_tests_docker.sh && \ docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v