bz0のにっき

quick and dirty prototype

Werckerを最小限の構成で試す(PHP)

Werckerを少し触ってみている。
Wercker Home

PHPUnitで、単純な単体テストをする(DB使わない)最小限の構成です。

Werckerでの構成

  • CentOS6.5

DockerのBoxを利用する
https://hub.docker.com/r/hasedon/centos6.5/

  • PHP5.3.3
  • PHPUnit3.7.38

環境が古くてすみません。

wercker.yml

box: hasedon/centos6.5
build:
  steps:
    - script:
        name: repo install
        code: |-
            wget https://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm
            wget https://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-14.ius.el6.noarch.rpm
            rpm -Uvh epel-release-6-5.noarch.rpm
            rpm -Uvh ius-release-1.0-14.ius.el6.noarch.rpm
    - script:
        name: PHP Install
        code: |-
            yum -y install php php-cli php-common php-mbstring php-mysql php-devel php-xml
            php -v
    - script:
        name: composer Install
        code: |-
            curl -sS https://getcomposer.org/installer | php
    - script:
        name: phpunit Install
        code: |-
            php composer.phar update
    - script:
        name: phpunit
        code: |-
            vendor/bin/phpunit Test.php