From f497aaa5b97a12911cafc1136c9c4109648628e5 Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Wed, 14 Oct 2020 12:46:01 -0500 Subject: [PATCH] First try --- .scripts/run-tests.sh | 10 ++++++++++ .travis.yml | 20 ++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100755 .scripts/run-tests.sh diff --git a/.scripts/run-tests.sh b/.scripts/run-tests.sh new file mode 100755 index 00000000..e4fa8f7c --- /dev/null +++ b/.scripts/run-tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Wrapper for the test executing function so we only have to change it in one place. +# The module name gets passed in as a command line arg. +if [ "$1" == "unit" ]; then + TYPE="--type=IslandoraKernelTestBase" +elif [ "$1" == "functional" ]; then + TYPE="--type=IslandoraFunctionalTestBase,WebDriverTestBase" +fi +php core/scripts/run-tests.sh --suppress-deprecations --concurrency=2 --url http://127.0.0.1:8282 --verbose --php `which php` --module "$2" $TYPE diff --git a/.travis.yml b/.travis.yml index b0dcc8ce..6a464811 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ php: - 7.2 - 7.3 +env: + - TESTSUITE=unit + - TESTSUITE=integration + matrix: fast_finish: true allow_failures: @@ -16,11 +20,14 @@ branches: only: - /^8.x/ - /master/ + - /fix-travis/ before_install: - export SCRIPT_DIR=$HOME/islandora/.scripts + - export CUSTOM_SCRIPT=$DRUPAL_DIR/web/modules/custom/islandora/.scripts - export DRUPAL_DIR=/opt/drupal - export COMPOSER_PATH="/home/travis/.phpenv/versions/$TRAVIS_PHP_VERSION/bin/composer" + - phpenv config-rm xdebug.ini install: - git clone https://github.com/Islandora/documentation.git $HOME/islandora @@ -36,12 +43,13 @@ install: script: - $SCRIPT_DIR/travis_scripts.sh - - $SCRIPT_DIR/run-tests.sh "islandora" - - $SCRIPT_DIR/run-tests.sh "islandora_breadcrumbs" - - $SCRIPT_DIR/run-tests.sh "islandora_image" - - $SCRIPT_DIR/run-tests.sh "islandora_audio" - - $SCRIPT_DIR/run-tests.sh "islandora_video" - - $SCRIPT_DIR/run-tests.sh "islandora_text_extraction" + - $SCRIPT_DIR/run-tests.sh $TESTSUITE "islandora" + - $SCRIPT_DIR/run-tests.sh $TESTSUITE "islandora_breadcrumbs" + - $SCRIPT_DIR/run-tests.sh $TESTSUITE "islandora_image" + - $SCRIPT_DIR/run-tests.sh $TESTSUITE "islandora_audio" + - $SCRIPT_DIR/run-tests.sh $TESTSUITE "islandora_video" + - $SCRIPT_DIR/run-tests.sh $TESTSUITE "islandora_text_extraction" + - phpdbg -qrr phpunit after_success: - bash <(curl -s https://codecov.io/bash)