mirror of https://github.com/nextcloud/server
Use phpunit from composer if available
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
a23cd7b961
commit
5b0f7f7501
10
.drone.yml
10
.drone.yml
|
@ -1842,7 +1842,7 @@ steps:
|
||||||
XDEBUG_MODE: coverage
|
XDEBUG_MODE: coverage
|
||||||
commands:
|
commands:
|
||||||
- phpenmod xdebug
|
- phpenmod xdebug
|
||||||
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=NODB ./autotest.sh sqlite
|
- TEST_SELECTION=NODB ./autotest.sh sqlite
|
||||||
- wget https://codecov.io/bash -O codecov.sh
|
- wget https://codecov.io/bash -O codecov.sh
|
||||||
- bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
- bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
||||||
|
|
||||||
|
@ -1874,7 +1874,7 @@ steps:
|
||||||
XDEBUG_MODE: coverage
|
XDEBUG_MODE: coverage
|
||||||
commands:
|
commands:
|
||||||
- phpenmod xdebug
|
- phpenmod xdebug
|
||||||
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=QUICKDB ./autotest.sh sqlite
|
- TEST_SELECTION=QUICKDB ./autotest.sh sqlite
|
||||||
- wget https://codecov.io/bash -O codecov.sh
|
- wget https://codecov.io/bash -O codecov.sh
|
||||||
- bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
- bash codecov.sh -Z -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
||||||
|
|
||||||
|
@ -1916,7 +1916,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- phpenmod xdebug
|
- phpenmod xdebug
|
||||||
- ./tests/drone-wait-objectstore.sh
|
- ./tests/drone-wait-objectstore.sh
|
||||||
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=PRIMARY-s3 ./autotest.sh sqlite
|
- TEST_SELECTION=PRIMARY-s3 ./autotest.sh sqlite
|
||||||
- wget https://codecov.io/bash -O codecov.sh
|
- wget https://codecov.io/bash -O codecov.sh
|
||||||
- bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
- bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
||||||
|
|
||||||
|
@ -1946,7 +1946,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- phpenmod xdebug
|
- phpenmod xdebug
|
||||||
- ./tests/drone-wait-objectstore.sh
|
- ./tests/drone-wait-objectstore.sh
|
||||||
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit TEST_SELECTION=PRIMARY-azure ./autotest.sh sqlite
|
- TEST_SELECTION=PRIMARY-azure ./autotest.sh sqlite
|
||||||
- wget https://codecov.io/bash -O codecov.sh
|
- wget https://codecov.io/bash -O codecov.sh
|
||||||
- bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
- bash codecov.sh -C $DRONE_COMMIT -f tests/autotest-clover-sqlite.xml
|
||||||
|
|
||||||
|
@ -1978,7 +1978,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- phpenmod xdebug
|
- phpenmod xdebug
|
||||||
- service memcached restart
|
- service memcached restart
|
||||||
- PHPUNIT_EXE=build/integration/vendor/bin/phpunit ./autotest.sh sqlite tests/lib/Memcache/MemcachedTest.php
|
- ./autotest.sh sqlite tests/lib/Memcache/MemcachedTest.php
|
||||||
- wget https://codecov.io/bash -O codecov.sh
|
- wget https://codecov.io/bash -O codecov.sh
|
||||||
- sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
|
- sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
|
||||||
- sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
|
- sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
|
||||||
|
|
|
@ -30,8 +30,13 @@ if [ -z "$PHP_EXE" ]; then
|
||||||
fi
|
fi
|
||||||
PHP=$(which "$PHP_EXE")
|
PHP=$(which "$PHP_EXE")
|
||||||
if [ -z "$PHPUNIT_EXE" ]; then
|
if [ -z "$PHPUNIT_EXE" ]; then
|
||||||
PHPUNIT_EXE=phpunit
|
if [ -f "build/integration/vendor/bin/phpunit" ]; then
|
||||||
|
PHPUNIT_EXE="./build/integration/vendor/bin/phpunit"
|
||||||
|
else
|
||||||
|
PHPUNIT_EXE=phpunit
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PHPUNIT=$(which "$PHPUNIT_EXE")
|
PHPUNIT=$(which "$PHPUNIT_EXE")
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
@ -56,7 +61,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ -x "$PHPUNIT" ]; then
|
if ! [ -x "$PHPUNIT" ]; then
|
||||||
echo "phpunit executable not found, please install phpunit version >= 6.5" >&2
|
echo "phpunit executable not found, please install phpunit version >= 9.0" >&2
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue