-
Notifications
You must be signed in to change notification settings - Fork 1
Automated tests and CI services
All SilverLeague modules must have a comprehensive suite of automated tests, including (but not necessarily limited to) PHPUnit tests, before it can be moved to the "active support" stage.
We (and SilverStripe) encourage developers to follow the PHP versions that the SilverStripe Framework supports. This is currently PHP 5.6 or above.
You should use the PHPUnit version that is capable of supporting that version, which is currently PHPUnit 5.7.
All SilverLeague modules must maintain at least 60% code coverage to be brought into development, with a minimum of 80% for active support.
Where possible, functional testing with Behat is encouraged.
SilverLeague modules will all be configured to use a variety of continuous integration providers to ensure that code quality and stability is maintained as code changes.
Modules will use Travis CI for running automated test suites. It will run on a matrix of the following:
- PHP: 5.6, 7.0, 7.1, 7.2, 7.3
- SilverStripe recipe-core or recipe-cms: 1.0.x-dev, 1.1.x-dev, 4.2.x-dev, 4.3.x-dev, 4.x-dev
- Database drivers: MySQL (default), PostgreSQL
All modules will display a "build" badge in its readme.
Travis configuration should include the after_success
command to send coverage information to Codecov.io after a successful build.
SilverLeague modules will have an automated module score (example) score of 50% or greater to be brought into development, and a score of 90% or greater to be considered for active support.
Modules will use Scrutinizer CI for running static code analysis. A "code quality" and "coverage" badge will be present in the readme for each of our modules.
Modules will use Codecov.io for code coverage reporting. The actual coverage reports will be generated in Travis CI builds, and sent to Codecov.io.
For more information on continuous integration system implementations please see the templates page.