Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions testing/run_all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

set -ex

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# only run when explicitly set
if [ "${RUN_CS_FIXER}" = "true" ]; then
testing/run_cs_check.sh;
$DIR/run_cs_check.sh;
fi
testing/run_test_suite.sh;
$DIR/run_test_suite.sh;
# only run for travis crons
if [ "${TRAVIS_EVENT_TYPE}" != "pull_request" ]; then
testing/run_dependency_check.sh;
$DIR/run_dependency_check.sh;
fi
4 changes: 3 additions & 1 deletion testing/run_cs_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ if [ -f "vendor/bin/php-cs-fixer" ]; then
elif [ -f "./php-cs-fixer" ]; then
PHP_CS_FIXER="./php-cs-fixer"
fi
$PHP_CS_FIXER fix --dry-run --diff

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$PHP_CS_FIXER fix --dry-run --diff --config="$DIR/../.php_cs.dist" --path-mode=intersection .
6 changes: 5 additions & 1 deletion testing/run_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ else
RUN_ALL_TESTS=0
fi

if [ "${TEST_DIRECTORIES}" = "" ]; then
TEST_DIRECTORIES="*"
fi

# Loop through all directories containing "phpunit.xml*" and run the test suites.
find * -name 'phpunit.xml*' -not -path '*/vendor/*' -exec dirname {} \; | while read DIR
find $TEST_DIRECTORIES -name 'phpunit.xml*' -not -path '*vendor/*' -exec dirname {} \; | while read DIR
do
# Only run tests for samples that have changed.
if [ "$RUN_ALL_TESTS" -ne "1" ]; then
Expand Down