Commit Graph

116 Commits

Author SHA1 Message Date
Damian Mooyman
4ee78fc29d BUG Restore travis artifacts (#6277)
Fixes #6046
2016-11-03 12:17:15 +13:00
Damian Mooyman
d7cb38434e
Create separate cms-config.yml for cms behat tests within framework 2016-11-02 10:54:09 +13:00
Damian Mooyman
81087ce15c BUG restore CMS build as required in framework tests 2016-11-01 17:31:35 +13:00
Sam Minnee
213cf8841b NEW: Test webpack build as part of NPM test run.
FIX: Ensure that “npm run build” failures report an error code.
2016-11-01 16:35:40 +13:00
Damian Mooyman
e386c6a153 FIX: Refactor bootstrap.php to allow for code sharing with cms bootstrap 2016-10-28 10:53:11 +13:00
Sam Minnee
c47a1d9091 NEW: Simplified test runs.
We don’t use SQLite in production and so it doesn’t need to be part of
our build matrix.
2016-10-26 16:16:35 +13:00
Sam Minnee
015411307d FIX: Require php7 support. 2016-10-26 15:38:19 +13:00
Ingo Schommer
0c06c4d389 Fast-finish Travis builds
The PHP7 build includes code coverage, which makes it run a bit longer now.
In general, we shouldn't wait for allowed_failures with build feedback.
Travis seems to run builds (roughly) in order, so allowed_failures
tend to prolong build times, since it only runs a few builds concurrently.

We'll move the PHP7 build out of allowed_failures eventually,
but I think the general concept still applies:
There's little value in waiting around for allowed_failures builds.

See https://blog.travis-ci.com/2013-11-27-fast-finishing-builds/
2016-09-27 09:19:41 +13:00
Ingo Schommer
345b4d56e6 Code coverage via CodeCov on PHP7 builds
PHP7+phpdbg is waaaay faster: http://blog.remirepo.net/post/2015/11/09/PHPUnit-code-coverage-benchmark
2016-09-26 22:33:03 +13:00
Damian Mooyman
9062680ccc Restore CMS build to CI 2016-09-22 08:31:56 +12:00
Sam Minnee
3ea23ce2b7 FIX: Make PR builds work.
PR builds are consistently failing because the version of framework
being used cannot be inferred. This environment variable provides the
answer.

It will need to be fixed for each major release, but I think that’s
less maintenance burden than complicating the build script to read this
from composer.json:extra.branch-alias.dev-master.
2016-09-21 09:26:29 +12:00
Sam Minnee
b19475d748 NEW: Ignore npm-shrinkwrap for greenskeeper-provided PRs. 2016-09-18 14:52:00 +12:00
Sam Minnee
c2ebff5c19 NEW: Use sass-lint over scss-lint
SCSS linting now uses the node-based sass-lint tool, since we’re
shifting away from CodeClimate.

This has the benefit of not requiring a ruby gem on dev tools -
everything is provided as npm dev dependencies.

This was also necessary to run the linting inside travis.
2016-09-18 14:50:27 +12:00
Sam Minnee
f700d86557 NEW: Run JS/CSS linting in Travis.
The ‘npm run lint’ command will be used to run listing on Travis, which
can also be used on local dev environments. These can also be used with
editor plugins to highlight errors immediately.

The intention is that this can be used in place of codeclimate. The
benefits are that we use a single toolchain in both CI and local dev,
which is not entirely the case at the moment.

Note the sass-lint is provided by “sudo gem install scss_lint”. It’s
possible that we can move to a node-based sass-lint; I can’t recall
what the motivation for using the scss_lint gem was - I think it was
mainly that we had the AirBNB styleguide already implemented as a linter
config.
2016-09-18 14:49:08 +12:00
Sam Minnee
07396e4437 NEW: Move Travis behat test to run locally.
This shifts the behat test run to be triggered form composer activity
within the framework module directly,

 * silverstripe/serve is used to provide a webserver, based on the
   php -S command
 * se/selenium-server-standalone is used to install selenium rather than
   a download command

Because we’re using serve, the behat configuration can be locked down.

Further refinements could be made on this:

 * the behat-extension could be responsible for installing and
   starting/stopping selenium, making these tests more portable
 * xvfb initialisation could be provided with another bin tool in the
   begat-extension: vendor/bin/xvfb 1024x768
 * The bootstrap-file argument to serve could be provided as part of a
   composer.json setting. This would make it easier for developers to
   start a dev server simply by running vendor/bin/serve
 * the behat-extension could be responsible for installing and
   starting/stopping silverstripe/serve, removing the need for
   specifying base_url at all, and possibly utilising the same bootstrap
   file between serve and behat.
2016-09-17 15:40:37 +12:00
Sam Minnee
9dd5ebee8c NEW: Don’t set up SilverStripe project for test run
The SilverStripe project structure complicates the travis test run, and
the goal of this branch is to prevent it from being necessary.

 - Unit tests can be run simply with PHPUnit.
 - Behat test can be run with the silverstripe/serve module

Note that initially this commit doesn’t cater to the behat tests.

As part of this, we allow dev packages to be installed when testing

These settings don’t affect projects that use framework, only when
framework’s composer install / require calls are used themselves.

Since SS4 is pre-stable, these are important. They can probably be
removed once SS4 stable (and stable versions of support packages) have
been released.
2016-09-16 16:16:44 +12:00
Ingo Schommer
556667c4ea Removed unused "npm run sanity"
We're no longer copying JS sources around,
hence there's no need for this task.
2016-09-16 13:46:11 +12:00
Damian Mooyman
af5a539c9a Re-enable travis artifacts on framework (#5807) 2016-07-14 14:53:21 +12:00
Ingo Schommer
6aa9dbdb0e Added NPM tests
Also simplified logic branching by introducing $PHPUNIT_TEST.
2016-05-04 20:29:18 +12:00
Damian Mooyman
4bc04e795a Excuse php7 errors due to regressions in 7.0.6 2016-05-04 16:33:40 +12:00
Damian Mooyman
d52db0ba34 Merge 3 into master
# Conflicts:
#	.travis.yml
#	admin/css/ie7.css
#	admin/css/ie7.css.map
#	admin/css/ie8.css.map
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.js
#	admin/scss/_style.scss
#	admin/scss/_uitheme.scss
#	control/HTTPRequest.php
#	core/Object.php
#	css/AssetUploadField.css
#	css/AssetUploadField.css.map
#	css/ConfirmedPasswordField.css.map
#	css/Form.css.map
#	css/GridField.css.map
#	css/TreeDropdownField.css.map
#	css/UploadField.css
#	css/UploadField.css.map
#	css/debug.css.map
#	dev/Debug.php
#	docs/en/00_Getting_Started/00_Server_Requirements.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Extend_CMS_Interface.md
#	filesystem/File.php
#	filesystem/Folder.php
#	filesystem/GD.php
#	filesystem/Upload.php
#	forms/ToggleField.php
#	forms/Validator.php
#	javascript/lang/en_GB.js
#	javascript/lang/fr.js
#	javascript/lang/src/en.js
#	javascript/lang/src/fr.js
#	model/Image.php
#	model/UnsavedRelationList.php
#	model/Versioned.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/DBField.php
#	model/fieldtypes/Enum.php
#	scss/AssetUploadField.scss
#	scss/UploadField.scss
#	templates/email/ChangePasswordEmail.ss
#	templates/forms/DropdownField.ss
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
#	tests/forms/EnumFieldTest.php
#	tests/security/MemberTest.php
#	tests/security/MemberTest.yml
#	tests/security/SecurityTest.php
2016-04-29 17:50:55 +12:00
Daniel Hensby
679185514d
Merge 3.3 into 3
Conflicts:
	admin/css/screen.css.map
2016-04-26 00:24:59 +01:00
Daniel Hensby
745faebd81
Merge 3.2 into 3.3
Conflicts:
	.travis.yml
2016-04-26 00:17:09 +01:00
Ingo Schommer
539fbe94d8 Include CMS smoke tests in Travis builds
We've had a few failures where framework caused regressions in CMS,
so these builds are helpful. They'll increase the overall build
times on the "silverstripe" user because of Travis' build limitations.

The parallel per-build run times shouldn't increase, since
framework builds take longer than cms builds anyway:
CMS Behat build took 13:53 on last 3.3 run,
framework MySQL PDO build took 16:12.
2016-04-06 19:55:43 +12:00
Ingo Schommer
85a361444c Disable xdebug on Travis runs
We're not using it for code coverage,
and it's slowing down both composer and phpunit builds.

Recommended by Travis:
https://docs.travis-ci.com/user/speeding-up-the-build/#PHP-optimisations
2016-03-29 17:21:55 +13:00
Sam Minnee
52ca089d0b NEW: Ensure php7 builds pass.
SilverStripe 4 should work in php7, so we shouldn't accept its failure.
2016-03-22 17:39:09 +13:00
Daniel Hensby
7c037d8034 trying to fix imagik properly 2016-03-08 15:38:30 +00:00
Damian Mooyman
aa57427874 BUG Don't install imagick on php 5.3 2016-03-08 10:37:01 +13:00
Ingo Schommer
49888e1bf8 Fixed core release constraint in travis.yml 2016-03-04 16:57:40 +13:00
David Craig
254b942737 Adds npm for managing client-side dependencies
- Includes a package.json file with build and CI scripts
- Includes shrinkwrap file for locking dependency version
- Includes Gulp for running build tasks
- Includes a 'build' task for copying library files from node_modules to thirdparty
- Includes a 'sanity' task for makes sure library files in thirdparty match what's in node_modules
- Includes updates to .travis.yml (new JS_SANITY_CHECK flag) to run the sanity task
2016-01-13 09:23:47 +13:00
Damian Mooyman
1e1a7a345c Merge remote-tracking branch 'origin/3'
Conflicts:
	control/Director.php
	filesystem/File.php
	filesystem/GD.php
	filesystem/ImagickBackend.php
	forms/HtmlEditorField.php
	javascript/UploadField_uploadtemplate.js
	model/Image.php
	model/Image_Backend.php
	model/fieldtypes/Enum.php
	templates/AssetUploadField.ss
	tests/model/ImageTest.php
	tests/search/FulltextFilterTest.php
2015-11-03 14:23:16 +13:00
Damian Mooyman
c4dc10b255 Merge remote-tracking branch 'origin/3.2' into 3
Conflicts:
	forms/DropdownField.php
	tests/model/ImageTest.php
2015-11-03 13:06:39 +13:00
Ingo Schommer
7d17068062 Increase minimum required PHP version to 5.5
See mailinglist discussion at https://groups.google.com/forum/#!topic/silverstripe-dev/7mVvhNNeNps
2015-10-22 23:11:16 +13:00
Damian Mooyman
6c117cd629 BUG fix imagick interface and add to travis 2015-10-06 12:40:24 +13:00
Damian Mooyman
143e4eae5f Fix travis php version back to 5.4 2015-09-09 17:46:42 +12:00
Damian Mooyman
b552a7370f Merge remote-tracking branch 'origin/3'
Conflicts:
	tests/model/ImageTest.php
2015-09-09 15:44:47 +12:00
Damian Mooyman
309ac0d196 Merge remote-tracking branch 'origin/3.1' into 3.2
Conflicts:
	.travis.yml
	admin/code/CMSProfileController.php
	admin/tests/LeftAndMainTest.php
	control/HTTP.php
	security/Permission.php
	tests/forms/FormTest.php
	tests/model/ArrayListTest.php
	tests/security/PermissionTest.php
2015-09-09 14:35:29 +12:00
Damian Mooyman
96d20bc180 BUG Fix missing framework/admin/tests 2015-09-07 18:04:56 +12:00
Sam Minnee
ab44f5ef47 MINOR: Simplify build matrix for 3.x builds.
This is a companion to https://github.com/silverstripe/silverstripe-framework/pull/4556
but targeted at the build needs of SilverStripe 3.x. Commit into 3.1 and
then the merge forward into 3.2 and 3.
2015-08-29 15:50:49 +12:00
Sam Minnee
68ac1021f7 MINOR: Refine build matrix.
It's important to test different databases. It's important to test
different versions of PHP. But we don't need to test all possible
versions of each tested in a cartesian product.

This patch ensures that there are 4 builds that cover:

 - PHP 5.4, 5.5, 5.6
 - MySQL, PostgreSQL and SQLite
 - PDO and each db-specific connector
 - Behat and non
2015-08-29 15:18:23 +12:00
Sam Minnee
be4be53fae MINOR: Drop wasteful 'allow-failures' builds.
Our build time is an impediment: frequently we're slowed down waiting for
test runs to complete. In this context, running allowed-failure builds
that everyone ignores is just a waste.

I'd love to see HHVM work, but that's going to require that someone
actually gets the build to pass. At that point, we can add it back into
the build matrix.

I'm working on a PHP7 branch that will hopefully also fix our nightly
builds. Once I get that going, I'll add those two back, but not have
'allow failures'

Even if we decide, at some point in the future, that supporting nightly
doesn't make sense, I see the *only* value of Travis is maintaining our
green tick. We either care about builds or we don't: I've never seen a
'grey area' build result in anything other than embarrassment and
technical debt.

Let's decide what matters to us and treat it like it matters to us:
it's part of the build or not.
2015-08-28 16:50:44 +12:00
Sam Minnée
a40e70f874 Merge pull request #4535 from kinglozzer/travis-notifications
Disable IRC notifications for Travis builds
2015-08-25 18:10:46 +12:00
Loz Calver
71eb7d3364 Disable IRC notifications for Travis builds 2015-08-24 11:56:04 +01:00
Daniel Hensby
af5ef13e6c Merge branch '3.1' into 3.2 2015-08-18 16:39:35 +01:00
Daniel Hensby
a73f9ba8fb Remove nightly build as PHP 7 support is explicitly off 2015-08-17 16:50:05 +01:00
Daniel Hensby
a8ab5a468d Merge branch '3.1' into 3.2
Conflicts:
	admin/code/LeftAndMain.php
	composer.json
2015-08-17 11:43:28 +01:00
Abagail Yost
30bdcc5dc3 Explicitly don't support PHP7 2015-08-05 15:28:38 +10:00
Sam Minnee
cd02fff8e4 Remove PHP 5.3 from Travis suite, updating minimum version requirement.
Since SilverStripe 4 isn't going to work on PHP 5.3, I have removed it from the Travis suite.
2015-08-04 19:42:54 +12:00
Damian Mooyman
09210efbc0 Merge remote-tracking branch 'origin/3'
Conflicts:
	composer.json
	control/Session.php
	docs/en/05_Contributing/01_Code.md
	docs/en/05_Contributing/02_Release_Process.md
	forms/FormField.php
	model/DataQuery.php
	model/Image.php
	model/queries/SQLConditionalExpression.php
	view/SSViewer.php
	view/ViewableData.php
2015-07-31 15:49:35 +12:00
Damian Mooyman
7ee444e08a Merge remote-tracking branch 'origin/3.1' into 3.2
Conflicts:
	admin/code/LeftAndMain.php
	control/injector/SilverStripeServiceConfigurationLocator.php
	core/ClassInfo.php
	filesystem/File.php
	model/DataObject.php
	model/DataQuery.php
	search/filters/FulltextFilter.php
	search/filters/SearchFilter.php
	tests/core/ClassInfoTest.php
	tests/filesystem/FileTest.php
	tests/model/DataListTest.php
2015-07-31 11:38:18 +12:00