-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI tool configurations to fit SS4 conventions
Also update test class to use non-deprecated methods from core (such as Config::update). Fix a few code sniffer errors.
- Loading branch information
Dylan Wagstaff
committed
Nov 22, 2017
1 parent
4fb947d
commit 352bc67
Showing
12 changed files
with
79 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/codecov.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
inherit: true | ||
|
||
build: | ||
nodes: | ||
analysis: | ||
tests: | ||
override: [php-scrutinizer-run] | ||
|
||
checks: | ||
php: | ||
code_rating: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
# See https://github.com/silverstripe/silverstripe-travis-support for setup details | ||
language: php | ||
|
||
sudo: false | ||
|
||
env: | ||
global: | ||
- COMPOSER_ROOT_VERSION=1.0.x-dev | ||
- CORE_RELEASE=4 | ||
# The path of the module when installed by composer | ||
- MODULE_PATH=iframe | ||
- COMPOSER_ROOT_VERSION=2.0.x-dev | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 5.6 | ||
env: DB=MYSQL | ||
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1 | ||
- php: 7.0 | ||
env: DB=MYSQL | ||
env: DB=MYSQL PHPUNIT_TEST=1 | ||
- php: 7.1 | ||
env: DB=MYSQL | ||
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1 | ||
- php: 7.2 | ||
env: DB=MYSQL PHPUNIT_TEST=1 | ||
|
||
before_script: | ||
- composer self-update || true | ||
# Init PHP | ||
- 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 | ||
- 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 --prefer-dist | ||
- composer require --no-update silverstripe/recipe-cms:1.0.x-dev | ||
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile | ||
|
||
script: | ||
- vendor/bin/phpunit $MODULE_PATH/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 code/ tests/ *.php; fi | ||
|
||
after_success: | ||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
<?php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
comment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="SilverStripe"> | ||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description> | ||
|
||
<rule ref="PSR2" > | ||
<!-- Current exclusions --> | ||
<exclude name="PSR1.Methods.CamelCapsMethodName" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true"> | ||
<testsuite name="Default"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">code/</directory> | ||
<exclude> | ||
<directory suffix=".php">tests/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters