Allow to test against different docker images

This commit is contained in:
Mario de Frutos Dieguez 2019-04-10 10:48:56 +02:00
parent 22aae632de
commit 2f74515323
No known key found for this signature in database
GPG Key ID: C9738009A2E89223
2 changed files with 13 additions and 9 deletions

View File

@ -1,8 +1,12 @@
jobs: language: generic
include: sudo: required
- sudo: required env:
services: 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 - docker
language: generic before_install: docker pull ${DOCKER_IMAGE}
before_install: docker pull carto/nodejs-xenial-pg101:latest script: npm run docker-test -- ${DOCKER_IMAGE} ${NODE_VERSION}
script: npm run docker-test -- 10.15.1

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/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 docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v