-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29423 from owncloud/stable10-drone-enabling-phpun…
…it-sqlite [Stable10] Moved phpunit 7.1 sqlite job from jenkins to drone
- Loading branch information
Showing
3 changed files
with
135 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
set -xeo pipefail | ||
|
||
if [[ "$(pwd)" == "$(cd "$(dirname "$0")"; pwd -P)" ]]; then | ||
echo "Can only be executed from project root!" | ||
exit 1 | ||
fi | ||
|
||
if [[ -f config/config.php ]]; then | ||
cp config/config.php config/config.backup.php | ||
fi | ||
|
||
rm -rf data config/config.php | ||
|
||
if [[ "${DB_TYPE}" == "none" || "${DB_TYPE}" == "sqlite" ]]; then | ||
./occ maintenance:install -vvv --database=sqlite --database-name=owncloud --database-table-prefix=oc_ --admin-user=admin --admin-pass=admin --data-dir=$(pwd)/data | ||
else | ||
case "${DB_TYPE}" in | ||
mariadb) | ||
wait-for-it mariadb:3306 | ||
DB=mysql | ||
;; | ||
mysql) | ||
wait-for-it mysql:3306 | ||
DB=mysql | ||
;; | ||
postgres) | ||
wait-for-it postgres:5432 | ||
DB=pgsql | ||
;; | ||
*) | ||
echo "Unsupported database type!" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
./occ maintenance:install -vvv --database=${DB} --database-host=${DB_TYPE} --database-user=owncloud --database-pass=owncloud --database-name=owncloud --database-table-prefix=oc_ --admin-user=admin --admin-pass=admin --data-dir=$(pwd)/data | ||
fi | ||
|
||
./occ app:enable files_sharing | ||
./occ app:enable files_trashbin | ||
./occ app:enable files_versions | ||
./occ app:enable provisioning_api | ||
./occ app:enable federation | ||
./occ app:enable federatedfilesharing | ||
|
||
if [[ "${DB_TYPE}" == "none" ]]; then | ||
GROUP="--exclude-group DB" | ||
else | ||
GROUP="--group DB" | ||
fi | ||
|
||
exec ./lib/composer/bin/phpunit --configuration tests/phpunit-autotest.xml ${GROUP} --coverage-clover tests/autotest-clover-${DB_TYPE}.xml --coverage-html tests/coverage-html-${DB_TYPE} --log-junit tests/autotest-results-${DB_TYPE}.xml | ||
|