Add combined test suite for installer

Remove teamcity config from default install
Partial implementation of #164
Fixes #166
This commit is contained in:
Damian Mooyman 2017-04-04 16:02:44 +12:00
parent c2c184cbb9
commit f3d64abd55
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
4 changed files with 81 additions and 41 deletions

15
.gitattributes vendored
View File

@ -1,14 +1,11 @@
.gitattributes export-ignore
.cow.json export-ignore .cow.json export-ignore
.editorconfig export-ignore
.env.example export-ignore
.gitattributes export-ignore
.travis.yml export-ignore
behat.yml export-ignore behat.yml export-ignore
build.properties.default export-ignore
build.xml export-ignore build.xml export-ignore
changelog-definitions.default export-ignore
CONTRIBUTING.md export-ignore CONTRIBUTING.md export-ignore
dependent-modules.default export-ignore LICENSE export-ignore
Makefile export-ignore
phpunit.teamcity.mssql.xml export-ignore
phpunit.teamcity.postgresql.xml export-ignore
phpunit.teamcity.sqlite3.xml export-ignore
phpunit.teamcity.xml export-ignore
phpunit.xml.dist export-ignore phpunit.xml.dist export-ignore
README.md

57
.travis.yml Normal file
View File

@ -0,0 +1,57 @@
language: php
sudo: false
addons:
apt:
packages:
- tidy
env:
global:
- COMPOSER_ROOT_VERSION=4.0.x-dev
- DB=MYSQL
matrix:
fast_finish: true
include:
# Core php tests
- php: 5.6
env:
- PHPUNIT_TEST=core
- php: 7.1.2
env:
- PHPUNIT_TEST=core
- PDO=1
# admin php tests
- php: 5.6
env:
- PHPUNIT_TEST=admin
- php: 7.1.2
env:
- PHPUNIT_TEST=admin
- PDO=1
# @todo behat tests
before_script:
# Init PHP
- export CORE_RELEASE=$TRAVIS_BRANCH
- 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 install --prefer-dist
- composer require silverstripe/framework 4.0.x-dev silverstripe/config:1.0.x-dev embed/embed ^3.0 silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --prefer-dist
- if [[ $PHPUNIT_TEST == admin ]]; then composer require silverstripe/cms:4.0.x-dev silverstripe/asset-admin:1.0.x-dev silverstripe/campaign-admin:1.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/reports:4.0.x-dev --prefer-dist; fi
# Bootstrap dependencies
- if [[ $PHPUNIT_TEST == admin ]]; then php ./cms/tests/bootstrap/mysite.php; fi
script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit --testsuite $PHPUNIT_TEST; fi
notifications:
slack: silverstripeltd:Cls1xnypKBLFhv0YIRtNLzlQ

View File

@ -1,32 +0,0 @@
<phpunit bootstrap="framework/tests/bootstrap.php" colors="false" backupGlobals="false" backupStaticAttributes="false" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" syntaxCheck="false" verbose="true" strict="true">
<testsuite name="Default">
<directory>mysite/tests</directory>
<directory>cms/tests</directory>
<directory>framework/tests</directory>
<directory>mssql/tests</directory>
</testsuite>
<listeners>
<listener class="TeamCityListener" file="framework/dev/TeamCityListener.php"/>
</listeners>
<groups>
<exclude>
<group>sanitychecks</group>
</exclude>
</groups>
<php>
<!--
Set different database connection.
Relies on the presence of the 'zframeworktest_dbswitcher' module
(https://github.com/silverstripe-labs/zframeworktest_dbswitcher),
as well as on constants in _ss_environment.php (see module README).
-->
<get name="db" value="mssql"/>
<!-- Always flush the manifest -->
<get name="flush" value="1"/>
</php>
</phpunit>

View File

@ -24,6 +24,24 @@
<directory>framework/tests</directory> <directory>framework/tests</directory>
</testsuite> </testsuite>
<!-- core components -->
<testsuite name="core">
<directory>framework/tests/php/</directory>
<directory>silverstripe-assets/tests/php/</directory>
<directory>versioned/tests/php/</directory>
</testsuite>
<!-- admin components -->
<testsuite name="admin">
<directory>cms/tests/</directory>
<directory>silverstripe-admin/tests/php/</directory>
<directory>campaign-admin/tests/php/</directory>
<directory>asset-admin/tests/php/</directory>
<directory>graphql/tests/</directory>
<directory>siteconfig/tests/</directory>
<directory>reports/tests/</directory>
</testsuite>
<groups> <groups>
<exclude> <exclude>
<group>sanitychecks</group> <group>sanitychecks</group>