diff --git a/.gitattributes b/.gitattributes index 4ff3c7d..d33a7e9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,14 +1,11 @@ -.gitattributes export-ignore .cow.json export-ignore +.editorconfig export-ignore +.env.example export-ignore +.gitattributes export-ignore +.travis.yml export-ignore behat.yml export-ignore -build.properties.default export-ignore build.xml export-ignore -changelog-definitions.default export-ignore CONTRIBUTING.md export-ignore -dependent-modules.default 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 +LICENSE export-ignore phpunit.xml.dist export-ignore +README.md diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a1ce9dc --- /dev/null +++ b/.travis.yml @@ -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 + diff --git a/phpunit.teamcity.mssql.xml b/phpunit.teamcity.mssql.xml deleted file mode 100644 index 8778e28..0000000 --- a/phpunit.teamcity.mssql.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - mysite/tests - cms/tests - framework/tests - mssql/tests - - - - - - - - - sanitychecks - - - - - - - - - - - diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8cde0ae..586da26 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -24,6 +24,24 @@ framework/tests + + + framework/tests/php/ + silverstripe-assets/tests/php/ + versioned/tests/php/ + + + + + cms/tests/ + silverstripe-admin/tests/php/ + campaign-admin/tests/php/ + asset-admin/tests/php/ + graphql/tests/ + siteconfig/tests/ + reports/tests/ + + sanitychecks