-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from silverstripe/bugfix/stable-branch-cleanup
BUG: Stable branch cleanup
- Loading branch information
Showing
14 changed files
with
131 additions
and
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,39 @@ | ||
language: php | ||
version: ~> 1.0 | ||
|
||
dist: xenial | ||
import: | ||
- silverstripe/silverstripe-travis-shared:config/provision/standard.yml | ||
|
||
services: | ||
- mysql | ||
- postgresql | ||
- xvfb | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache/files | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- tidy | ||
- chromium-chromedriver | ||
- chromium-browser | ||
|
||
env: | ||
global: | ||
- DB=MYSQL | ||
- COMPOSER_ROOT_VERSION=1.x-dev | ||
- DISPLAY=":99" | ||
- XVFBARGS=":99 -ac -screen 0 1024x768x16" | ||
- SS_BASE_URL="http://localhost:8080/" | ||
- SS_ENVIRONMENT_TYPE="dev" | ||
|
||
matrix: | ||
jobs: | ||
include: | ||
- php: 7.1 | ||
env: PHPUNIT_TEST=1 | ||
- php: 7.2 | ||
env: BEHAT_TEST=1 | ||
- php: 7.3 | ||
env: PHPUNIT_TEST=1 | ||
- php: 7.4 | ||
env: PHPUNIT_TEST=1 | ||
- php: 7.1 | ||
env: NPM_TEST=1 | ||
- php: 7.2 | ||
env: PHPCS_TEST=1 | ||
env: | ||
- DB=MYSQL | ||
- REQUIRE_INSTALLER="$REQUIRE_RECIPE 4.x-dev" | ||
- PHPUNIT_TEST=1 | ||
- PHPCS_TEST=1 | ||
- PHPSTAN_TEST=1 | ||
- php: 7.3 | ||
env: | ||
- DB=PGSQL | ||
- REQUIRE_INSTALLER="$REQUIRE_RECIPE 4.x-dev" | ||
- PHPUNIT_TEST=1 | ||
|
||
before_script: | ||
# Extra $PATH | ||
- export PATH=/usr/lib/chromium-browser/:$PATH | ||
|
||
# Init PHP | ||
- phpenv rehash | ||
- phpenv config-rm xdebug.ini | ||
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
|
||
# Install composer | ||
- composer validate | ||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.x-dev --prefer-dist; fi | ||
- composer require silverstripe/recipe-testing:^1 silverstripe/recipe-cms 4.x-dev --no-update --prefer-dist | ||
- composer update | ||
|
||
# Remove preinstalled Chrome (google-chrome) | ||
# this would conflict with our chromium-browser installation | ||
# and its version is incompatible with chromium-chromedriver | ||
- sudo apt-get remove -y --purge google-chrome-stable || true | ||
|
||
# Start behat services | ||
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi | ||
- if [[ $BEHAT_TEST ]]; then cp composer.lock artifacts/; fi | ||
- if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi | ||
- if [[ $BEHAT_TEST ]]; then (chromedriver > artifacts/chromedriver.log 2>&1 &); fi | ||
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi | ||
|
||
# Install NPM dependencies | ||
- if [[ $NPM_TEST ]]; then rm -rf client/dist && nvm install && nvm use && npm install -g yarn && yarn install --network-concurrency 1 && (cd vendor/silverstripe/admin && yarn install --network-concurrency 1) && yarn run build; fi | ||
|
||
script: | ||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit tests/php; fi | ||
- if [[ $NPM_TEST ]]; then git diff-files --quiet -w --relative=client; fi | ||
- if [[ $NPM_TEST ]]; then git diff --name-status --relative=client; fi | ||
- if [[ $NPM_TEST ]]; then yarn run test; fi | ||
- if [[ $NPM_TEST ]]; then yarn run lint; fi | ||
- if [[ $BEHAT_TEST ]]; then vendor/bin/behat @link; fi | ||
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi | ||
|
||
after_failure: | ||
- php ./vendor/silverstripe/framework/tests/behat/travis-upload-artifacts.php --if-env BEHAT_TEST,ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/ --artifacts-path ./artifacts/ | ||
- COW_TEST=1 | ||
- php: 7.4 | ||
env: | ||
- DB=MYSQL | ||
- PDO=1 | ||
- REQUIRE_INSTALLER="$REQUIRE_RECIPE 4.x-dev" | ||
- PHPUNIT_COVERAGE_TEST=1 | ||
- php: 7.4 | ||
env: | ||
- DB=MYSQL | ||
- REQUIRE_INSTALLER="$REQUIRE_RECIPE 4.x-dev" | ||
- PHPUNIT_TEST=1 | ||
- REQUIRE_GRAPHQL="^3@dev" | ||
- php: 8.0 | ||
env: | ||
- DB=MYSQL | ||
- REQUIRE_INSTALLER="$REQUIRE_RECIPE 4.x-dev" | ||
- PHPUNIT_TEST=1 | ||
- REQUIRE_GRAPHQL="^3@dev" | ||
- COMPOSER_INSTALL_ARG=--ignore-platform-reqs |
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 |
---|---|---|
@@ -1,25 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="SilverStripe"> | ||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description> | ||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description> | ||
|
||
<!-- base rules are PSR-2 --> | ||
<rule ref="PSR2" > | ||
<!-- Current exclusions --> | ||
<exclude name="PSR1.Methods.CamelCapsMethodName" /> | ||
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" /> | ||
<exclude name="PSR2.Classes.PropertyDeclaration" /> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration" /> <!-- causes php notice while linting --> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" /> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault" /> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" /> | ||
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" /> | ||
<exclude name="Squiz.Scope.MethodScope" /> | ||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" /> | ||
<exclude name="Generic.Files.LineLength.TooLong" /> | ||
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" /> | ||
</rule> | ||
<file>src</file> | ||
<file>tests</file> | ||
|
||
<!-- base rules are PSR-2 --> | ||
<rule ref="PSR2" > | ||
<!-- Current exclusions --> | ||
<exclude name="PSR1.Methods.CamelCapsMethodName" /> | ||
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" /> | ||
<exclude name="PSR2.Classes.PropertyDeclaration" /> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration" /> <!-- causes php notice while linting --> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" /> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault" /> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" /> | ||
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" /> | ||
<exclude name="Squiz.Scope.MethodScope" /> | ||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" /> | ||
<exclude name="Generic.Files.LineLength.TooLong" /> | ||
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" /> | ||
</rule> | ||
|
||
<!-- PHP-PEG generated file not intended for human consumption --> | ||
<exclude-pattern>*/SSTemplateParser.php$</exclude-pattern> | ||
</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
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
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
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
Oops, something went wrong.