Travis setup

This commit is contained in:
Daniel Hensby 2017-10-10 14:23:17 +01:00
parent 536ada309e
commit c00a11cf7e
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
2 changed files with 34 additions and 14 deletions

View File

@ -1,30 +1,34 @@
# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details
language: php
dist: precise
sudo: false
language: php
php:
- 5.5
- 5.6
- 7.0
- 7.1
env:
- DB=SQLITE CORE_RELEASE=master PDO=1
- DB=SQLITE CORE_RELEASE=4 PDO=1
matrix:
fast_finish: true
include:
- php: 5.6
env: DB=SQLITE CORE_RELEASE=master PDO=0
allow_failures:
- php: 7.0
env: DB=SQLITE CORE_RELEASE=4 PDO=0
before_script:
- composer self-update || true
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
- cd ~/builds/ss
- composer install
# Init PHP
- printf "\n" | pecl install imagick
- phpenv rehash
- phpenv config-rm xdebug.ini
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Install composer dependencies
- composer validate
- composer require symfony/config:^3.2 silverstripe/framework:4.0.x-dev silverstripe/cms:4.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/config:1.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --no-update
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
script:
- vendor/bin/phpunit framework/tests
- vendor/bin/phpunit vendor/silverstripe/framework/tests

16
phpunit.xml.dist Normal file
View File

@ -0,0 +1,16 @@
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
<testsuite name="Default">
<directory>tests</directory>
</testsuite>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">.</directory>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>