Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
CI: add phing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrtak-CZ committed Jan 17, 2016
1 parent de96d02 commit b63c445
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ install:
- composer update --no-interaction --prefer-source $COMPOSER_DEPENDENCIES_OPTIONS

script:
- bin/parallel-lint -e php,phpt src tests
- bin/phpcs -sp --standard=vendor/nella/coding-standard/Nella/ruleset.xml src tests
- bin/phpunit --configuration tests/phpunit.xml tests
- bin/phing ci-build

after_success:
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.0/coveralls.phar
Expand Down
4 changes: 1 addition & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,4 @@ install:
- composer update --no-interaction --prefer-source

test_script:
- bin/parallel-lint -e php,phpt src tests
- bin/phpcs -sp --standard=vendor/nella/coding-standard/Nella/ruleset.xml src tests
- bin/phpunit --configuration tests/phpunit.xml tests
- bin/phing ci-build
98 changes: 98 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<project name="Monolog Tracy" default="build">
<property name="path.build" value="${project.basedir}/build"/>
<property name="path.build.properties.local" value="${path.build}/build.local.properties"/>

<property file="${path.build.properties.local}"/>

<property name="path.bin" value="${path.root}/bin"/>
<property name="path.composer.executable" value="composer"/>
<property name="path.phpcs.executable" value="${path.bin}/phpcs"/>
<property name="path.phpcs.ruleset" value="${path.vendor}/nella/coding-standard/Nella/ruleset.xml"/>
<property name="path.phplint.executable" value="${path.bin}/parallel-lint"/>
<property name="path.phpunit.configuration" value="${path.tests}/phpunit.xml"/>
<property name="path.phpunit.executable" value="${path.bin}/phpunit"/>
<property name="path.root" value="${project.basedir}"/>
<property name="path.src" value="${path.root}/src"/>
<property name="path.tests" value="${path.root}/tests"/>
<property name="path.vendor" value="${path.root}/vendor"/>

<target name="build" depends="
composer,
check
"/>

<target name="ci-build" depends="
composer-validate,
check
"/>

<target name="check" depends="
phplint,
cs,
tests
"/>

<target name="composer" depends="composer-validate">
<exec
executable="${path.composer.executable}"
logoutput="true"
passthru="true"
checkreturn="true"
>
<arg value="install"/>
</exec>
</target>

<target name="composer-validate">
<exec
executable="${path.composer.executable}"
logoutput="true"
passthru="true"
checkreturn="true"
>
<arg value="validate"/>
<arg value="--no-check-lock"/>
</exec>
</target>

<target name="phplint">
<exec
executable="${path.phplint.executable}"
logoutput="true"
passthru="true"
checkreturn="true"
>
<arg path="${path.src}"/>
<arg path="${path.tests}"/>
</exec>
</target>

<target name="cs">
<exec
executable="${path.phpcs.executable}"
logoutput="true"
passthru="true"
checkreturn="true"
>
<arg value="--standard=${path.phpcs.ruleset}"/>
<arg value="--extensions=php"/>
<arg value="--encoding=utf-8"/>
<arg value="-sp"/>
<arg path="${path.src}"/>
<arg path="${path.tests}"/>
</exec>
</target>

<target name="tests">
<exec
executable="${path.phpunit.executable}"
logoutput="true"
passthru="true"
checkreturn="true"
>
<arg value="--configuration"/>
<arg value="${path.phpunit.configuration}"/>
</exec>
</target>
</project>
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"matthiasnoback/symfony-dependency-injection-test": "0.7.6",
"nella/coding-standard": "4.1.0",
"phing/phing": "2.13.0",
"phpunit/phpunit": "5.1.4",
"twig/twig": "1.23.3"
},
Expand Down

0 comments on commit b63c445

Please sign in to comment.