# HG changeset patch # User Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> # Date 1608285195 -3600 # Node ID b35ed8684036f1f7d00322b90e7c0568b009de4e # Parent 17959d0d69236e856588349393df388a9e41aa6f Run monetdb in a service container So we can later test against multiple versions of MonetDB by taking the image name from a matrix diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml --- a/.github/workflows/runtests.yml +++ b/.github/workflows/runtests.yml @@ -11,22 +11,18 @@ jobs: runtests: runs-on: ubuntu-latest env: - DBFARM: /var/lib/monetdb + DBI_DSN: dbi:monetdb:database=demo + + services: + monetdb: + image: monetdb/monetdb:latest + ports: + - 50000:50000 steps: + - uses: actions/checkout@v2 - - name: Install MonetDB - run: | - set -x -e - lsb_release -c -s - sudo apt-get -qq update - sudo apt-get -qq install -y software-properties-common curl make libdbi-perl - curl -s https://www.monetdb.org/downloads/MonetDB-GPG-KEY | sudo apt-key add - - sudo add-apt-repository "deb http://dev.monetdb.org/downloads/deb/ $(lsb_release -c -s) monetdb" - sudo apt-get -qq update - sudo apt-get -qq install -qqy monetdb5-server - - name: Run Unit-Tests run: | set -x -e diff --git a/runtests.sh b/runtests.sh --- a/runtests.sh +++ b/runtests.sh @@ -1,31 +1,11 @@ #!/bin/bash -DBPATH="$PWD"/DB - - set -e -x -# Start the mserver -rm -rf "$DBPATH" -mkdir "$DBPATH" -mserver5 --dbpath="$DBPATH/perltestdb" >"$DBPATH/mserver5.log" 2>&1 & -pid=$! -# Make sure to kill it when the script ends -trap "kill -9 $pid 2>/dev/null" EXIT - +export DBI_DSN=dbi:monetdb:database=demo -# After a few seconds, check if it's still running -sleep 3 -if ! kill -0 $pid 2>/dev/null; then - echo "MSERVER STOPPED EARLY" - cat "$DBPATH/mserver5.log" - exit 1 -fi - -export DBI_DSN=dbi:monetdb:database=perltestdb export PERL5LIB=$PWD/MonetDB-CLI-MapiPP:$PWD/MonetDB-CLI:$PWD - for i in DBD MonetDB-CLI/MonetDB MonetDB-CLI-MapiPP/MonetDB/CLI do (