Skip to content

Commit

Permalink
upgrade travis configuration (#12)
Browse files Browse the repository at this point in the history
* add eXistdb5 images to the job matrix
* use curl from the host machine
  • Loading branch information
peterstadler authored Dec 2, 2020
1 parent 40d299a commit 7344ad6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 7344ad6

Please sign in to comment.