Skip to content
Snippets Groups Projects
Commit eac50fca authored by Ulf Seltmann's avatar Ulf Seltmann
Browse files

added dev-dependencies to add ci-tools via composer

Conflicts:
	README.md
parent ccb3c02a
No related merge requests found
...@@ -12,6 +12,25 @@ Installation ...@@ -12,6 +12,25 @@ Installation
See online documentation at http://vufind.org/wiki/vufind2:installation_notes See online documentation at http://vufind.org/wiki/vufind2:installation_notes
Testing
-------
For performing all ci-tasks you have to add all dev-dependencies. Do so like this
php composer.phar update
this adds all necessary tools like phing, phpunit, etc
After that you can perform the task with the following command
phing
be aware that you need several programs like java and mysql to setup a solr-index and a database-store in order to
test the components of vufind that communicate with them
You might need to set up the mysql-user credentials should they not agree with your mysql root-users credentials.
you can do that by providing optional parameters like that
phing -Dmysqlrootpass=''
do so if you have no rootpassword set. the default password is 'password'
Modules Modules
------- -------
...@@ -19,4 +38,4 @@ Modules ...@@ -19,4 +38,4 @@ Modules
* all non-global non-community modules go to * all non-global non-community modules go to
module/finc/ module/finc/
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<property name="package" value="${phing.project.name}" override="true" /> <property name="package" value="${phing.project.name}" override="true" />
<property name="builddir" value="${tmp}/build/${phing.project.name}" override="true" /> <property name="builddir" value="${tmp}/build/${phing.project.name}" override="true" />
<property name="srcdir" value="${project.basedir}" override="true" /> <property name="srcdir" value="${project.basedir}" override="true" />
<property name="composerdir" value="${srcdir}/vendor/bin" />
<property name="apacheconfdir" value="/etc/apache2/conf.d" /> <property name="apacheconfdir" value="/etc/apache2/conf.d" />
<property name="apachectl" value="false" /><!-- set to apachectl path to spin up Apache instance --> <property name="apachectl" value="false" /><!-- set to apachectl path to spin up Apache instance -->
<property name="nodepath" value="" /><!-- set to node.js modules path to use Zombie.js testing --> <property name="nodepath" value="" /><!-- set to node.js modules path to use Zombie.js testing -->
...@@ -63,27 +64,27 @@ ...@@ -63,27 +64,27 @@
<!-- Report rule violations with PHPMD (mess detector) --> <!-- Report rule violations with PHPMD (mess detector) -->
<target name="phpmd"> <target name="phpmd">
<exec command="phpmd ${srcdir}/module xml ${srcdir}/tests/phpmd.xml --exclude ${srcdir}/module/VuFind/tests,${srcdir}/module/VuDL/tests,${srcdir}/module/VuFindSearch/tests --reportfile ${builddir}/reports/phpmd.xml" /> <exec command="${composerdir}/phpmd ${srcdir}/module xml ${srcdir}/tests/phpmd.xml --exclude ${srcdir}/module/VuFind/tests,${srcdir}/module/VuDL/tests,${srcdir}/module/VuFindSearch/tests --reportfile ${builddir}/reports/phpmd.xml" />
</target> </target>
<!-- Measure project with phploc --> <!-- Measure project with phploc -->
<target name="phploc"> <target name="phploc">
<exec command="phploc --log-csv ${builddir}/reports/phploc.csv ${srcdir}/module" /> <exec command="${composerdir}/phploc --log-csv ${builddir}/reports/phploc.csv ${srcdir}/module" />
</target> </target>
<!-- PHP_Depend code analysis --> <!-- PHP_Depend code analysis -->
<target name="pdepend"> <target name="pdepend">
<exec command="pdepend --jdepend-xml=${builddir}/reports/jdepend.xml --jdepend-chart=${builddir}/reports/dependencies.svg --overview-pyramid=${builddir}/reports/pdepend-pyramid.svg ${srcdir}/module" /> <exec command="${composerdir}/pdepend --jdepend-xml=${builddir}/reports/jdepend.xml --jdepend-chart=${builddir}/reports/dependencies.svg --overview-pyramid=${builddir}/reports/pdepend-pyramid.svg ${srcdir}/module" />
</target> </target>
<!-- PHP copy-and-paste detection --> <!-- PHP copy-and-paste detection -->
<target name="phpcpd"> <target name="phpcpd">
<exec command="phpcpd --log-pmd ${builddir}/reports/pmd-cpd.xml --exclude tests ${srcdir}/module" /> <exec command="${composerdir}/phpcpd --log-pmd ${builddir}/reports/pmd-cpd.xml --exclude tests ${srcdir}/module" />
</target> </target>
<!-- PHP CodeSniffer --> <!-- PHP CodeSniffer -->
<target name="phpcs"> <target name="phpcs">
<exec command="phpcs --standard=PEAR --ignore=*/config/*,*/tests/* --extensions=php --report=checkstyle ${srcdir}/module &gt; ${builddir}/reports/checkstyle.xml" escape="false" /> <exec command="${composerdir}/phpcs --standard=PEAR --ignore=*/config/*,*/tests/* --extensions=php --report=checkstyle ${srcdir}/module &gt; ${builddir}/reports/checkstyle.xml" escape="false" />
</target> </target>
<!-- PHP API Documentation --> <!-- PHP API Documentation -->
...@@ -99,12 +100,12 @@ ...@@ -99,12 +100,12 @@
<!-- PHPUnit --> <!-- PHPUnit -->
<target name="phpunit" description="Run tests"> <target name="phpunit" description="Run tests">
<exec dir="${srcdir}/module/VuFind/tests" command="NODE_PATH=${nodepath} VUFIND_LOCAL_DIR=${srcdir}/local VUFIND_URL=${vufindurl} phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" passthru="true" checkreturn="true" /> <exec dir="${srcdir}/module/VuFind/tests" command="NODE_PATH=${nodepath} VUFIND_LOCAL_DIR=${srcdir}/local VUFIND_URL=${vufindurl} ${composerdir}/phpunit -dzend.enable_gc=0 --log-junit ${builddir}/reports/phpunit.xml --coverage-clover ${builddir}/reports/coverage/clover.xml --coverage-html ${builddir}/reports/coverage/" passthru="true" checkreturn="true" />
</target> </target>
<!-- PHPUnit without logging output --> <!-- PHPUnit without logging output -->
<target name="phpunitfast" description="Run tests"> <target name="phpunitfast" description="Run tests">
<exec dir="${srcdir}/module/VuFind/tests" command="NODE_PATH=${nodepath} VUFIND_LOCAL_DIR=${srcdir}/local VUFIND_URL=${vufindurl} phpunit -dzend.enable_gc=0" passthru="true" checkreturn="true" /> <exec dir="${srcdir}/module/VuFind/tests" command="NODE_PATH=${nodepath} VUFIND_LOCAL_DIR=${srcdir}/local VUFIND_URL=${vufindurl} ${composerdir}/phpunit -dzend.enable_gc=0" passthru="true" checkreturn="true" />
</target> </target>
<!-- Install and Activate VuFind --> <!-- Install and Activate VuFind -->
......
...@@ -67,6 +67,14 @@ ...@@ -67,6 +67,14 @@
}, },
"require-dev": { "require-dev": {
"behat/mink": "1.6.*", "behat/mink": "1.6.*",
"behat/mink-zombie-driver": "*" "behat/mink-zombie-driver": "*",
"phing/phing": "2.*",
"phpunit/phpunit": "4.3.*",
"pear-pear.php.net/php_codesniffer": "*",
"phpdocumentor/phpdocumentor": "~2.9",
"sebastian/phpcpd": "*",
"phpmd/phpmd": "@stable",
"czproject/phpdepend": "*",
"phploc/phploc": "*"
} }
} }
File added
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment