From e01a2b6f2829051301994c5f7b07aa05b8d9d0aa Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 27 May 2019 16:50:04 +1200 Subject: [PATCH 1/5] Update Travis configuration --- .travis.yml | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0336aef4..2add41d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,37 @@ -# See https://github.com/silverstripe/silverstripe-travis-support for setup details - -sudo: false - language: php -php: - - 5.6 - - 7.0 - - 7.1 - env: - - DB=MYSQL CORE_RELEASE=4 - - DB=PGSQL CORE_RELEASE=4 + global: + - COMPOSER_ROOT_VERSION="4.0.x-dev" + +matrix: + include: + - php: 5.6 + env: DB=MYSQL RECIPE_VERSION=1.0.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1 + - php: 7.0 + env: DB=PGSQL RECIPE_VERSION=1.1.x-dev PHPUNIT_TEST=1 + - php: 7.1 + env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_TEST=1 + - php: 7.2 + env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPUNIT_TEST=1 + - php: 7.3 + env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1 + - php: 7.3 + env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 before_script: - - composer self-update || true - - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support - - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss - - cd ~/builds/ss - - composer install + - phpenv rehash + - phpenv config-rm xdebug.ini + + - composer validate + - composer require --no-update silverstripe/recipe-cms:"$RECIPE_VERSION" + - if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi + - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile script: - - vendor/bin/phpunit queuedjobs/tests + - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi + - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi + - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/ ; fi + +after_success: + - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi From 4e1bb1f2d10f5339e539daee6953da534c1bea89 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 27 May 2019 16:56:05 +1200 Subject: [PATCH 2/5] Add codesniffer to dev dependencies --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 69344daf..718858aa 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "asyncphp/doorman": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.0" }, "minimum-stability": "dev", "prefer-stable": true, From bd6a48a12ee5846fb8ba055201d29fd8dd2a6b9c Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 27 May 2019 18:07:22 +1200 Subject: [PATCH 3/5] Add phpcs ruleset from 4.4 branch --- phpcs.xml.dist | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 phpcs.xml.dist diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 00000000..b998e55f --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,11 @@ + + + CodeSniffer ruleset for SilverStripe coding conventions. + + + + + + + + From e6e18278ef8c2734a0df9f756d97dab73fc56264 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 28 May 2019 09:11:10 +1200 Subject: [PATCH 4/5] Remove phpcs runs from 4.0 branch, code not compliant --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2add41d7..5e39d613 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ env: matrix: include: - php: 5.6 - env: DB=MYSQL RECIPE_VERSION=1.0.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1 + env: DB=MYSQL RECIPE_VERSION=1.0.x-dev PHPUNIT_TEST=1 - php: 7.0 env: DB=PGSQL RECIPE_VERSION=1.1.x-dev PHPUNIT_TEST=1 - php: 7.1 From a70e5f5765f1d50f0aa28d3e93f88561d36d8f6b Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 14 Feb 2020 10:43:32 +1300 Subject: [PATCH 5/5] Use tagged versions for 1.x recipe-cms, use trusty --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e39d613..2c32791a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: php +dist: trusty + env: global: - COMPOSER_ROOT_VERSION="4.0.x-dev" @@ -7,9 +9,9 @@ env: matrix: include: - php: 5.6 - env: DB=MYSQL RECIPE_VERSION=1.0.x-dev PHPUNIT_TEST=1 + env: DB=MYSQL RECIPE_VERSION=~1.0.0 PHPUNIT_TEST=1 - php: 7.0 - env: DB=PGSQL RECIPE_VERSION=1.1.x-dev PHPUNIT_TEST=1 + env: DB=PGSQL RECIPE_VERSION=~1.1.0 PHPUNIT_TEST=1 - php: 7.1 env: DB=MYSQL RECIPE_VERSION=4.2.x-dev PHPUNIT_TEST=1 - php: 7.2