build.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="guzzle" default="test">
  3. <!-- set local values, like git location -->
  4. <property file="phing/build.properties.dist" override="true" />
  5. <property file="phing/build.properties" override="true" />
  6. <property name="dir.output" value="${project.basedir}/build/artifacts" />
  7. <property name="dir.imports" value="${project.basedir}/phing/imports" />
  8. <property name="dir.bin" value="${project.basedir}/bin" />
  9. <property name="repo.dir" value="${project.basedir}" />
  10. <import file="${dir.imports}/dependencies.xml"/>
  11. <import file="${dir.imports}/deploy.xml"/>
  12. <target name="composer-lint" description="lint-check composer.json only">
  13. <composerlint dir="${project.basedir}/src" file="{$project.basedir}/composer.json" />
  14. </target>
  15. <target name="test" description="Run unit tests">
  16. <exec passthru="true" command="vendor/bin/phpunit" checkReturn="true" />
  17. </target>
  18. <target name="build-init" description="Initialize local phing properties">
  19. <copy file="phing/build.properties.dist" tofile="phing/build.properties" overwrite="false" />
  20. </target>
  21. <target name="clean">
  22. <delete dir="${dir.output}"/>
  23. <delete dir="${project.basedir}/build/pearwork"/>
  24. </target>
  25. <target name="prepare" depends="clean,build-init">
  26. <mkdir dir="${dir.output}"/>
  27. <mkdir dir="${dir.output}/logs" />
  28. </target>
  29. <target name="coverage" depends="prepare">
  30. <exec passthru="true" command="vendor/bin/phpunit --coverage-html=${dir.output}/coverage" />
  31. </target>
  32. <target name="view-coverage">
  33. <exec passthru="true" command="open ${dir.output}/coverage/index.html" />
  34. </target>
  35. </project>