Skip to content

Commit

Permalink
travis-ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
psliwa committed Jan 31, 2012
1 parent 6d161cf commit fbe5cbb
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: php

php:
- 5.3

before_script:
- php vendor/vendors.php

script: phpunit --configuration Tests/phpunit.xml
2 changes: 2 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PsPdfBundle
===========

[![Build Status](https://secure.travis-ci.org/psliwa/PdfBundle.png?branch=master)](http://travis-ci.org/psliwa/PdfBundle)

This bundle integrates Symfony2 with [PHPPdf][1] library.

This branch is compatible with Zend Framework in 1.11 version. If you wish to use ZF2, you should be interested in master branch.
Expand Down
19 changes: 19 additions & 0 deletions Tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

$vendorDir = __DIR__.'/../vendor';
require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';

use Symfony\Component\ClassLoader\UniversalClassLoader;


$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony' => $vendorDir.'/symfony/src',
'Doctrine\\Common' => $vendorDir.'/doctrine-common/lib',
'Ps\\PdfBundle' => __DIR__.'/..',
'PHPPdf' => $vendorDir.'/PHPPdf/lib',
'Imagine' => $vendorDir.'/Imagine/lib',
'Zend' => $vendorDir.'/Zend/library'
));

$loader->register();
8 changes: 8 additions & 0 deletions Tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="bootstrap.php">
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./</directory>
</whitelist>
</filter>
</phpunit>
24 changes: 24 additions & 0 deletions vendor/vendors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

set_time_limit(0);

$deps = array(
array('symfony', 'git://github.com/symfony/symfony.git', isset($_ENV['SYMFONY_VERSION']) ? $_ENV['SYMFONY_VERSION'] : 'v2.0.9'),
array('Doctrine\Common', 'git://github.com/doctrine/common.git', isset($_ENV['DOCTRINE_COMMON_VERSION']) ? $_ENV['DOCTRINE_COMMON_VERSION'] : '2.1.4'),
array('Markdown', 'git://github.com/wolfie/php-markdown.git', 'd464071334'),
array('Zend', 'git://github.com/zendframework/zf2.git', 'master'),
array('Imagine', 'git://github.com/avalanche123/Imagine.git', 'v0.2.6')
);

foreach ($deps as $dep) {
list($name, $url, $rev) = $dep;

echo "> Installing/Updating $name\n";

$installDir = __DIR__.'/'.$name;
if (!is_dir($installDir)) {
system(sprintf('git clone %s %s', $url, $installDir));
}

system(sprintf('cd %s && git fetch origin && git reset --hard %s', $installDir, $rev));
}

0 comments on commit fbe5cbb

Please sign in to comment.