From e535a2af8d56de31fa66cbf8159f1b945cc75936 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 16 Oct 2018 12:00:57 +0200 Subject: [PATCH] Add Travis builds for CMS recipe modules --- .travis.yml | 32 ++++++++++++++++++++++++++++++++ README.md | 2 ++ composer.json | 4 ++-- phpunit.xml.dist | 14 ++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 100644 phpunit.xml.dist diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2216c02 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: php + +env: + global: + - COMPOSER_ROOT_VERSION=4.3.x-dev + +matrix: + include: + - php: 5.6 + env: DB=MYSQL + - php: 7.0 + env: DB=PGSQL + - php: 7.1 + env: DB=MYSQL + - php: 7.2 + env: DB=MYSQL + +before_script: + - phpenv rehash + - phpenv config-rm xdebug.ini + + - composer validate + - composer require --no-update silverstripe-themes/simple:~3.2.0 + - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.1.x-dev --no-update; fi + - composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile + + # Validate cow schema + - composer global require silverstripe/cow ^2 + - ~/.config/composer/vendor/bin/cow schema:validate + +script: + - vendor/bin/phpunit --testsuite recipe-cms diff --git a/README.md b/README.md index 5fb6cfa..628cc23 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## SilverStripe CMS Recipe +[![Build Status](https://travis-ci.org/silverstripe/recipe-cms.svg?branch=4)](https://travis-ci.org/silverstripe/recipe-cms) + Base page and asset content-editing recipe for a SilverStripe ([http://silverstripe.org](http://silverstripe.org)) installation. This includes the modules: diff --git a/composer.json b/composer.json index 5a4a54d..28ca0fe 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "silverstripe/versioned": "1.3.x-dev" }, "require-dev": { - "phpunit/PHPUnit": "^5.7" + "phpunit/phpunit": "^5.7" }, "extra": { "project-files": [ @@ -31,4 +31,4 @@ }, "prefer-stable": true, "minimum-stability": "dev" -} \ No newline at end of file +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..241582a --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,14 @@ + + + vendor/silverstripe/admin/tests + vendor/silverstripe/asset-admin/tests + vendor/silverstripe/campaign-admin/tests + vendor/silverstripe/cms/tests + vendor/silverstripe/errorpage/tests + vendor/silverstripe/graphql/tests + vendor/silverstripe/reports/tests + vendor/silverstripe/siteconfig/tests + vendor/silverstripe/versioned/tests + vendor/silverstripe/versioned-admin/tests + +