This repository contains prebuilt workflows and required containers for automated testing, building & delivery of projects (mostly Silverstripe related).
This repository provides a ready-to-use testsuite for your Silverstripe project. It provides the following checks:
- PHPUnit
- PHPStan
- Behat
- PHPcs
Usage is straightforward:
# ...
jobs:
silverstripe:
name: 🧰 Silverstripe Testsuite
uses: syntro-opensource/workflows/.github/workflows/silverstripe.yml@5
with:
phpunit: true
phpunit_suite: app/tests/
# phpunit_config_file:
# phpunit_php_version: '8.1'
# phpunit_build_graphql: false
phpstan: true
phpstan_dir: app/src/
# phpstan_php_version: '8.1'
phpcs: true
phpcs_dir: app/
# behat: false
# behat_php_version: '8.1'
You can enable an SSH-Client to clone private repositories described in composer.json
.
Please make sure you understand the risks of adding private keys to GitHub workflow Runs!
This feature can be enabled as follows:
# ...
jobs:
silverstripe:
name: 🧰 Silverstripe Testsuite
uses: syntro-opensource/workflows/.github/workflows/silverstripe.yml@5
with:
# ...
uses_private_repos: true
uses_private_keys: |
${{ secrets.YOURPRIVATEKEY }}
We use webfactory/ssh-agent to enable this feature. You can find more information there.
For Silverstripe 4 related Checks, use the
4
branch.
Each check can be configured using inputs.
This repository provides a testsuite for silverstripe modules. The testsuite is used as the standard in our modules and checks Code in a fixed range of php and CMS versions:
-
PHP 8.1
-
CMS 5.0
Usage is straightforward:
# ...
jobs:
silverstripe-module:
name: 🧰 Silverstripe Module Testsuite
uses: syntro-opensource/workflows/.github/workflows/silverstripe-module.yml@5
with:
phpunit: true
# phpunit_config_file:
phpstan: true
# phpstan_config:
# phpstan_bootstrap:
phpcs: true
Each check can be configured using inputs.
For Silverstripe 4 related Checks, use the
4
branch.
This repository also provides a testsuite for client-side code. The suite checks:
- ESlint
- Stylelint
- Jest
You can also configure which Node.js version the tests run on. The test suite defaults to 18.x
.
Usage is straightforward:
# ...
jobs:
silverstripe-client:
name: 📦 Client Testsuite
uses: syntro-opensource/workflows/.github/workflows/client.yml@5
with:
eslint: true
eslint_dir: client/src/seo-field/
eslint_configfile: client/src/seo-field/.eslintrc
eslint_node-ver: 16.x
# eslint_ext:
# eslint_max-warnings:
stylelint: true
stylelint_glob: client/src/seo-field/**/*.scss
stylelint_node-ver: 16.x
# stylelint_max-warnings:
jest: true
jest_node-ver: 16.x
Each check can be configured using inputs.
You can enable an SSH-Client to clone private repositories described in composer.json
.
Please make sure you understand the risks of adding private keys to GitHub workflow Runs!
This feature can be enabled as follows:
# ...
jobs:
silverstripe:
name: 📦 Client Testsuite
uses: syntro-opensource/workflows/.github/workflows/client.yml@5
with:
# ...
uses_private_repos: true
uses_private_keys: |
${{ secrets.YOURPRIVATEKEY }}
We use webfactory/ssh-agent to enable this feature. You can find more information there.
For Silverstripe 4 related Checks, use the
4
branch.