Download the PHP package webbuilders-group/silverstripe-recipe-github-ci without Composer
On this page you can find all versions of the php package webbuilders-group/silverstripe-recipe-github-ci. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webbuilders-group/silverstripe-recipe-github-ci
More information about webbuilders-group/silverstripe-recipe-github-ci
Files in webbuilders-group/silverstripe-recipe-github-ci
Package silverstripe-recipe-github-ci
Short Description Silverstripe Recipe for Bootstrapping a Project using GitHub Actions as a CI
License BSD-3-Clause
Informations about the package silverstripe-recipe-github-ci
Silverstripe GitHub Actions CI Recipe
Silverstripe Recipe for Bootstrapping a Project using GitHub Actions as a CI, for details on included/expanded features see the docs.
Maintainer Contact
- Ed Chipman (UndefinedOffset)
Requirements
- SilverStripe Framework 4.4+
Installation
Composer (recommended):
Getting Started
This recipe contains support for tests run against PHPUnit and Behat as well as code style validation using PHP_CodeSniffer (using PSR-2 standards). Out of the box this CI expects all site code to be in the app
folder. It also expects all PHPUnit tests to be in app/tests/PHPUnit
, with all Behat tests to be in app/tests/behat/features
.
If you do not need Behat tests you will need to remove the behat
job in .github/workflows/ci.yml
. If you want to disable PHP_CodeSniffer you need to remove the "Validate Code Style" step from the same file.
Failed Tests Artifacts
Artifacts such as an error log from Silverstripe, or screenshots from the Behat tests will be added to the artifacts section on for the action's run on GitHub. For the PHPUnit tests it will be named CI-<run number>-phpunit
, for Behat tests it will be named CI-<run number>-behat
unless you change them.
Testing Locally
Testing locally is still possible though it will of course work differently than the GitHub Actions runner will.
For PHPUnit
To run PHPUnit locally you can use the following to run all tests in the app/tests/PHPUnit
folder. If you want to run a specific test in that folder simply include the full path, so for example app/tests/PHPUnit
might become app/tests/PHPUnit/SomeFolder/SomeTest.php
.
For Behat
For Behat you either need to have to have your Silverstripe install in a webserver or use silverstripe/serve (included). As well you need to install and have running ChromeDriver in a version that matches your local install of Chrome.
After all of that, you should be able to run the following to run all Behat tests in the app/tests/behat/features
folder. If you want to run a specific test in that folder simply include the full path, so for example app/tests/behat/features
becomes app/tests/behat/features/some-folder/some-scenario.feature
.
All versions of silverstripe-recipe-github-ci with dependencies
silverstripe/recipe-cms Version ~4.4
phpunit/phpunit Version ^5.7
silverleague/ideannotator Version ~3.0
squizlabs/php_codesniffer Version ~3.4
silverstripe/behat-extension Version ~4.1
silverstripe/serve Version ~2.1