Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function testCli($option = [

if (!$inDocker)
{
$containerInfo = json_decode(`docker inspect cli_cli`);
$containerInfo = json_decode(`docker inspect joomlapythagoras_cli`);
$build = false;

if (empty($containerInfo))
Expand All @@ -293,10 +293,10 @@ public function testCli($option = [
if ($build)
{
$this->say('Building container.');
`docker-compose -f tests/cli/docker-compose.yml build`;
`docker-compose -f docker-compose-cli.yml build`;
}

$this->say(`docker-compose -f tests/cli/docker-compose.yml up`);
$this->say(`docker-compose -f docker-compose-cli.yml up`);

$this->remap('/var/test', __DIR__, 'build/reports/coverage.cli.php');

Expand Down
10 changes: 10 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@
/docs
/reports
/logs
/pdepend-summary.xml
/phpmd.xml
/pdepend-pyramid.svg
/phploc.xml
/phpmetrics.html
/phpcpd.xml
/checkstyle.xml
/phpmetrics.xml
/pdepend-jdepend.svg
/pdepend-jdepend.xml
17 changes: 8 additions & 9 deletions build/docker/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ RUN apt-get update \
sqlite3 \
libsqlite3-dev

# Install Composer
RUN cd /usr/src \
&& curl -sS https://getcomposer.org/installer -o composer-setup.php \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer

# Install MailCatcher
RUN gem install mailcatcher --no-ri --no-rdoc

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/ \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer

# Setup the Xdebug version to install
ENV XDEBUG_VERSION 2.4.1
ENV XDEBUG_SHA1 52b5cede5dcb815de469d671bfdc626aec8adee3
ENV XDEBUG_VERSION 2.5.1
ENV XDEBUG_SHA256 7fda9020fd5a2c549ae5a692fcabbb00f74e39dda81d53d25e622bdab4880ec2

# Install Xdebug
RUN set -x \
&& curl -SL "http://www.xdebug.org/files/xdebug-$XDEBUG_VERSION.tgz" -o xdebug.tgz \
&& echo $XDEBUG_SHA1 xdebug.tgz | sha1sum -c - \
&& echo $XDEBUG_SHA256 xdebug.tgz | sha256sum -c - \
&& mkdir -p /usr/src/xdebug \
&& tar -xf xdebug.tgz -C /usr/src/xdebug --strip-components=1 \
&& rm xdebug.* \
Expand Down
4 changes: 1 addition & 3 deletions build/docker/cli/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ cd $WORK_DIR
cp /usr/local/lib/php/prepend.php .
cp /usr/local/lib/php/append.php .
cp /usr/local/lib/php/phpunit_coverage.php .
cp tests/cli/codeception.yml .

echo "Running tests ..."

./libraries/vendor/bin/codecept run --coverage=coverage.cli.php cli
./libraries/vendor/bin/robo test:cli --coverage
return_code=$?

echo "Collecting results ..."
Expand All @@ -22,7 +21,6 @@ php phpunit_coverage.php
rm prepend.php
rm append.php
rm phpunit_coverage.php
rm codeception.yml

echo "Done."

Expand Down
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"vendor-dir": "libraries/vendor"
},
"require": {
"php": ">=5.5.9",
"league/flysystem": "^1.0",
"doctrine/dbal": "^2.5.5",
"league/tactician": "^1.0",
Expand All @@ -29,11 +28,9 @@
},
"require-dev": {
"codeception/codeception": "^2.0",
"codegyre/robo": "^0.7.0",
"slim/csrf": "^0.7.0",
"greencape/coding-standards": "^1.0",
"mayflower/php-codebrowser": "^1.1",
"apigen/apigen": "^4",
"codeception/mockery-module": "^0.2.2",
"phpmetrics/phpmetrics": "^1.10",
"phploc/phploc": "^2.1",
Expand All @@ -42,7 +39,8 @@
"phpmd/phpmd": "^2.4",
"phpunit/phpunit": "^5",
"phpunit/php-code-coverage": "^4",
"phpunit/phpunit-mock-objects": "^3.2"
"phpunit/phpunit-mock-objects": "^3.2",
"consolidation/robo": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading