1 Star 0 Fork 20

stamhe/kafka-php

forked from weiboad/kafka-php 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.xml 4.08 KB
一键复制 编辑 原始数据 按行查看 历史
nmred 提交于 2017-04-28 05:17 . update
<?xml version="1.0" encoding="UTF-8"?>
<project name="KafkaTest-php" default="build">
<target name="travis" depends="tests-parallel,show-test-results" />
<target name="local" depends="tests-parallel-local,show-test-results" />
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build"/>
</target>
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/test-results"/>
<mkdir dir="${basedir}/build/cs-results"/>
</target>
<target name="get-cs-fixer" depends="clean" description="Get coding standards fixer">
<get src="https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.1.0/php-cs-fixer.phar" dest="${basedir}/php-cs-fixer.phar"/>
</target>
<target name="get-cs-fixer-local" depends="clean" description="Get coding standards fixer" unless="fixer-exists">
<get src="https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.1.0/php-cs-fixer.phar" dest="${basedir}/php-cs-fixer.phar"/>
</target>
<target name="composer-install" description="Installs dependencies via composer install">
<sequential>
<exec executable="composer" failonerror="true">
<arg value="self-update" />
</exec>
<exec executable="composer" failonerror="true">
<arg value="--version" />
</exec>
</sequential>
</target>
<target
name="tests-parallel"
depends="prepare,composer-install,get-cs-fixer"
description="Run tests for the various components in parallel"
>
<parallel threadCount="8">
<!--
If there's a way of having this without the explicit component
list, please PR
<component-test component="Produce"/>
<component-test component="Protocol"/>
-->
<check-cs/>
</parallel>
</target>
<target
name="tests-parallel-local"
depends="prepare,get-cs-fixer-local"
description="Run tests for the various components in parallel"
>
<parallel threadCount="8">
<!--
If there's a way of having this without the explicit component
list, please PR
<component-test component="Produce"/>
<component-test component="Protocol"/>
-->
<check-cs/>
</parallel>
</target>
<target name="show-test-results" description="Display logged test results">
<concat>
<fileset dir="${basedir}/build/cs-results/"/>
<fileset dir="${basedir}/build/test-results/"/>
</concat>
</target>
<macrodef name="component-test">
<attribute name="component"/>
<sequential>
<echo output="${basedir}/build/test-results/@{component}.log" level="debug">
KafkaTest/@{component}
</echo>
<exec
executable="${basedir}/vendor/bin/phpunit"
output="${basedir}/build/test-results/@{component}.log"
error="${basedir}/build/test-results/@{component}.log"
failonerror="true"
append="true"
>
<arg value="-c" />
<arg value="${basedir}/tests/phpunit.xml.dist" />
<arg value="${basedir}/tests/KafkaTest/@{component}" />
</exec>
</sequential>
</macrodef>
<macrodef name="check-cs">
<sequential>
<echo output="${basedir}/build/cs-results/check-cs.log" level="debug">
Coding standards
</echo>
<exec
executable="${basedir}/bin/check-cs.sh"
output="${basedir}/build/cs-results/check-cs.log"
error="${basedir}/build/cs-results/check-cs.log"
failonerror="true"
append="true"
/>
</sequential>
</macrodef>
<condition property="fixer-exists">
<available file="${basedir}/php-cs-fixer.phar" type="file"></available>
</condition>
</project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/stamhe/kafka-php.git
git@gitee.com:stamhe/kafka-php.git
stamhe
kafka-php
kafka-php
master

搜索帮助