-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* namespacing * class mapping * tests overhaul * CI setup * phpcs cleanup
- Loading branch information
Showing
60 changed files
with
3,258 additions
and
2,130 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
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,53 +1,34 @@ | ||
language: php | ||
|
||
sudo: false | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- tidy | ||
|
||
before_install: | ||
- pip install --user codecov | ||
|
||
env: | ||
global: | ||
- DB=MYSQL CORE_RELEASE=3.4 | ||
- COVERAGE=0 | ||
- MODULE_PATH=foxystripe | ||
- COMPOSER_ROOT_VERSION=4.0.x-dev | ||
- CODECOV_TOKEN= | ||
- SCRUT_TOKEN= | ||
|
||
matrix: | ||
include: | ||
- php: 5.6 | ||
env: DB=PGSQL | ||
- php: 5.6 | ||
env: DB=SQLITE | ||
- php: 5.6 | ||
env: COVERAGE=1 | ||
- php: 7.0 | ||
env: CORE_RELEASE=master | ||
allow_failures: | ||
- php: 7.0 | ||
env: CORE_RELEASE=master | ||
|
||
env: DB=MYSQL PHPUNIT_TEST=1 PHPCS_TEST=1 | ||
- php: 7.1 | ||
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1 | ||
- php: 5.6 | ||
env: DB=MYSQL PHPUNIT_TEST=1 | ||
|
||
before_script: | ||
# Init PHP | ||
- phpenv rehash | ||
- composer self-update || true | ||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support | ||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss | ||
- cd ~/builds/ss | ||
- phpenv config-rm xdebug.ini | ||
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
|
||
script: | ||
# Execute tests with no coverage. This is the fastest option | ||
- "if [ \"$COVERAGE\" = \"0\" ]; then vendor/bin/phpunit $MODULE_PATH/tests/; fi" | ||
|
||
# Execute tests with coverage. Do this for a small | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/; fi" | ||
# Install composer dependencies | ||
- composer require --prefer-dist --no-update silverstripe-themes/simple:~3.2 | ||
- composer update --no-suggest --prefer-dist | ||
|
||
after_script: | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi" | ||
- cd ~/build/$TRAVIS_REPO_SLUG | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov && travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi" | ||
script: | ||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi | ||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml && wget https://scrutinizer-ci.com/ocular.phar; 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 -t $CODECOV_TOKEN && travis_retry php ocular.phar code-coverage:upload --format=php-clover --access-token=$SCRUT_TOKEN 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
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,22 +1,22 @@ | ||
--- | ||
Name: foxystripeconfig | ||
--- | ||
SiteConfig: | ||
SilverStripe\SiteConfig\SiteConfig: | ||
extensions: | ||
- FoxyStripeSiteConfig | ||
Member: | ||
- Dynamic\FoxyStripe\ORM\FoxyStripeSiteConfig | ||
SilverStripe\Security\Member: | ||
extensions: | ||
- CustomerExtension | ||
- Dynamic\FoxyStripe\ORM\CustomerExtension | ||
Page: | ||
extensions: | ||
- FoxyStripePageExtension | ||
DateField: | ||
- Dynamic\FoxyStripe\ORM\FoxyStripePageExtension | ||
SilverStripe\Forms\DateField: | ||
default_config: | ||
showcalendar: true | ||
FormField: | ||
SilverStripe\Forms\FormField: | ||
extensions: | ||
- FoxyStripeProductFormFieldExtension | ||
Injector: | ||
- Dynamic\FoxyStripe\ORM\FoxyStripeProductFormFieldExtension | ||
SilverStripe\Core\Injector\Injector: | ||
TimeZoneData: | ||
properties: | ||
format: '%Region/%Name' |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.