From 7344ad6a34e69a2e194ed2ab5c2b064f0074d6fa Mon Sep 17 00:00:00 2001 From: Peter Stadler Date: Wed, 2 Dec 2020 20:33:34 +0100 Subject: [PATCH] upgrade travis configuration (#12) * add eXistdb5 images to the job matrix * use curl from the host machine --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0931154..62f45f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,25 @@ +os: linux +dist: focal language: java services: - docker env: - matrix: - - DOCKER_IMAGE=stadlerpeter/existdb - - DOCKER_IMAGE=stadlerpeter/existdb:3.3.0 + - DOCKER_IMAGE=stadlerpeter/existdb EXIST_AUTODEPLOY=/opt/exist/autodeploy + - DOCKER_IMAGE=stadlerpeter/existdb:3.3.0 EXIST_AUTODEPLOY=/opt/exist/autodeploy + - DOCKER_IMAGE=stadlerpeter/existdb:5.2 EXIST_AUTODEPLOY=/opt/exist/autodeploy + - DOCKER_IMAGE=existdb/existdb:5.2.0 EXIST_AUTODEPLOY=/exist/autodeploy before_install: - docker pull ${DOCKER_IMAGE} - ant xar - curl http://exist-db.org/exist/apps/public-repo/public/functx-1.0.1.xar -o build/functx-1.0.1.xar - - docker create --name exist ${DOCKER_IMAGE} - - for i in build/*.xar ; do docker cp $i exist:/opt/exist/autodeploy/ ; done + - docker create --name exist -p 8080:8080 ${DOCKER_IMAGE} + - for i in build/*.xar ; do docker cp $i exist:${EXIST_AUTODEPLOY}/ ; done - docker start exist - i=0 ; while (! docker inspect exist | grep -e Status....healthy) ; do if ((i > 30)) ; then echo ' **** timeout ... aborting **** ' ; exit 1 ; else sleep 5 ; echo waiting for container ... ; i=$((i+1)) ; fi ; done - - docker exec -it exist cat webapp/WEB-INF/logs/exist.log - - docker exec -it exist curl "http://127.0.0.1:8080/exist/apps/WeGA-WebApp-lib/testing/run-tests.xql" > report.xml + - curl -LsS http://localhost:8080/exist/apps/WeGA-WebApp-lib/testing/run-tests.xql -o report.xml script: - grep testsuite report.xml && (! grep 'failures="[1-9]' report.xml) && (! grep 'errors="[1-9]' report.xml)