Skip to content

Commit

Permalink
Added code coverage using mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBertolinSG committed Nov 10, 2017
1 parent c369e11 commit 2347ac8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pipeline:
- PHP_VERSION=${PHP_VERSION}
- DB_TYPE=${DB_TYPE}
commands:
- env
- ./tests/drone/test-coverage.sh
when:
event: [push, pull_request]
Expand All @@ -86,8 +87,10 @@ pipeline:
pull: true
files:
- tests/autotest-clover-${DB_TYPE}.xml
flags:
- unit_tests
debug: true
when:
event: [push, pull_request]
matrix:
TEST_SUITE: coverage

Expand Down Expand Up @@ -240,3 +243,7 @@ matrix:
- PHP_VERSION: 7.1
DB_TYPE: mariadb
TEST_SUITE: coverage

- PHP_VERSION: 7.1
DB_TYPE: mysql
TEST_SUITE: coverage
6 changes: 6 additions & 0 deletions tests/drone/test-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,11 @@ fi
./occ app:enable federation
./occ app:enable federatedfilesharing

if [[ "${DB_TYPE}" == "none" || "${DB_TYPE}" == "sqlite" ]]; then
GROUP=""
else
GROUP="--group DB"
fi

exec phpdbg -d memory_limit=4096M -rr ./lib/composer/bin/phpunit --configuration tests/phpunit-autotest.xml ${GROUP} --coverage-clover tests/autotest-clover-${DB_TYPE}.xml

0 comments on commit 2347ac8

Please sign in to comment.