1
0
Fork 0

laravel5 skeleton: some updates

- logIncompleteSkipped : removed from recent phpunit versions
This commit is contained in:
Chl 2020-02-12 21:01:48 +01:00
parent df06ade180
commit 52e49a7d21
3 changed files with 107 additions and 14 deletions

View file

@ -54,6 +54,8 @@ jenkins_plugins_system_dependency:
- ant
- composer
- php-gd
- php-xml
- php-mbstring
- php-mysql
- php-pgsql
- php-xdebug # for the code coverage

View file

@ -67,6 +67,7 @@
<delete dir="${basedir}/build/logs"/>
<delete dir="${basedir}/build/pdepend"/>
<delete dir="${basedir}/build/phpdox"/>
<delete file="${basedir}/.env" />
<property name="clean.done" value="true"/>
</target>
@ -79,16 +80,69 @@
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
<mkdir dir="${basedir}/build/phpdox"/>
<copy file="${basedir}/.env.testing" tofile="${basedir}/.env" overwrite="true" />
<exec executable="composer" taskname="composer">
<arg value="install" />
<arg value="--optimize-autoloader" />
</exec>
<!-- little help debugging -->
<!--
<exec executable="php" taskname="artisanDisplayEnv">
<arg value="artisan" />
<arg value="env" />
</exec>
-->
<exec executable="php" taskname="artisanKeyGenerate">
<arg value="artisan" />
<arg value="key:generate" />
</exec>
<exec executable="php" taskname="artisanRouteCache">
<arg value="artisan" />
<arg value="route:cache" />
</exec>
<exec executable="php" taskname="artisanConfigCache">
<arg value="artisan" />
<arg value="config:cache" />
</exec>
<exec executable="php" taskname="artisanMigrate">
<arg value="artisan" />
<arg value="migrate:fresh" />
</exec>
<property name="prepare.done" value="true"/>
</target>
<target name="lint"
unless="lint.done"
description="Perform syntax check of sourcecode files">
<apply executable="php" taskname="lint">
<apply executable="php" taskname="lint" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/src">
<fileset dir="${basedir}/app">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/bootstrap">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/config">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/database">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/resources">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/routes">
<include name="**/*.php" />
<modified />
</fileset>
@ -107,7 +161,12 @@
description="Measure project size using PHPLOC and print human readable output. Intended for usage on the command line.">
<exec executable="${phploc}" taskname="phploc">
<arg value="--count-tests" />
<arg path="${basedir}/src" />
<arg path="${basedir}/app" />
<arg path="${basedir}/bootstrap" />
<arg path="${basedir}/config" />
<arg path="${basedir}/database" />
<arg path="${basedir}/resources" />
<arg path="${basedir}/routes" />
<arg path="${basedir}/tests" />
</exec>
@ -124,7 +183,12 @@
<arg path="${basedir}/build/logs/phploc.csv" />
<arg value="--log-xml" />
<arg path="${basedir}/build/logs/phploc.xml" />
<arg path="${basedir}/src" />
<arg path="${basedir}/app" />
<arg path="${basedir}/bootstrap" />
<arg path="${basedir}/config" />
<arg path="${basedir}/database" />
<arg path="${basedir}/resources" />
<arg path="${basedir}/routes" />
<arg path="${basedir}/tests" />
</exec>
@ -139,7 +203,7 @@
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
<arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
<arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
<arg path="${basedir}/src" />
<arg path="${basedir}/app,${basedir}/bootstrap,${basedir}/config,${basedir}/database,${basedir}/resources,${basedir}/routes" />
</exec>
<property name="pdepend.done" value="true"/>
@ -149,7 +213,7 @@
unless="phpmd.done"
description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpmd}" taskname="phpmd">
<arg path="${basedir}/src" />
<arg path="${basedir}/app,${basedir}/bootstrap,${basedir}/config,${basedir}/database,${basedir}/resources,${basedir}/routes" />
<arg value="text" />
<arg path="${basedir}/build/phpmd.xml" />
</exec>
@ -162,7 +226,7 @@
depends="prepare"
description="Perform project mess detection using PHPMD and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpmd}" taskname="phpmd">
<arg path="${basedir}/src" />
<arg path="${basedir}/app,${basedir}/bootstrap,${basedir}/config,${basedir}/database,${basedir}/resources,${basedir}/routes" />
<arg value="xml" />
<arg path="${basedir}/build/phpmd.xml" />
<arg value="--reportfile" />
@ -176,10 +240,15 @@
unless="phpcs.done"
description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcs}" taskname="phpcs">
<arg value="--standard=PSR2" />
<arg value="--standard=build/phpcs.xml" />
<arg value="--extensions=php" />
<arg value="--ignore=autoload.php" />
<arg path="${basedir}/src" />
<arg path="${basedir}/app" />
<!-- <arg path="${basedir}/bootstrap" /> -->
<!-- <arg path="${basedir}/config" /> -->
<arg path="${basedir}/database" />
<arg path="${basedir}/resources" />
<arg path="${basedir}/routes" />
<arg path="${basedir}/tests" />
</exec>
@ -193,10 +262,16 @@
<exec executable="${phpcs}" output="/dev/null" taskname="phpcs">
<arg value="--report=checkstyle" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=PSR2" />
<arg value="--standard=${basedir}/build/phpcs.xml" />
<arg value="--extensions=php" />
<arg value="--ignore=autoload.php" />
<arg path="${basedir}/src" />
<arg value="--ignore=bootstrap/cache" />
<arg path="${basedir}/app" />
<!-- <arg path="${basedir}/bootstrap" /> -->
<!-- <arg path="${basedir}/config" /> -->
<arg path="${basedir}/database" />
<arg path="${basedir}/resources" />
<arg path="${basedir}/routes" />
<arg path="${basedir}/tests" />
</exec>
@ -207,7 +282,15 @@
unless="phpcpd.done"
description="Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcpd}" taskname="phpcpd">
<arg path="${basedir}/src" />
<arg path="${basedir}/app" />
<!-- Not needed for duplication ?
<arg path="${basedir}/bootstrap" />
<arg path="${basedir}/config" />
-->
<arg path="${basedir}/database" />
<arg path="${basedir}/resources" />
<arg path="${basedir}/routes" />
<arg path="${basedir}/tests" />
</exec>
<property name="phpcpd.done" value="true"/>
@ -220,7 +303,15 @@
<exec executable="${phpcpd}" taskname="phpcpd">
<arg value="--log-pmd" />
<arg path="${basedir}/build/logs/pmd-cpd.xml" />
<arg path="${basedir}/src" />
<arg path="${basedir}/app" />
<!-- Not needed for duplication ?
<arg path="${basedir}/bootstrap" />
<arg path="${basedir}/config" />
-->
<arg path="${basedir}/database" />
<arg path="${basedir}/resources" />
<arg path="${basedir}/routes" />
<arg path="${basedir}/tests" />
</exec>
<property name="phpcpd.done" value="true"/>

View file

@ -32,6 +32,6 @@
<log type="coverage-html" target="./coverage"/>
<log type="coverage-clover" target="./logs/clover.xml"/>
<log type="coverage-crap4j" target="./logs/crap4j.xml"/>
<log type="junit" target="./logs/junit.xml" logIncompleteSkipped="false"/>
<log type="junit" target="./logs/junit.xml" />
</logging>
</phpunit>