Skip to content

Tests Since v0.3.2

In this section it will be explained on how to define tests.

The following example shows all settings that can be set and which will be explained on this page:

yaml
tests:
  lint:
    name: Run php-cs-fixer and phpstan
    tests:
    - phpcsfixer
    - phpstan
  phpcsfixer:
    name: Run php-cs-fixer
    commands:
    - php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -vvv --dry-run --diff --using-cache=no
  phpstan:
    name: Run phpstan
    commands:
    - php -d memory_limit=1G vendor/bin/phpstan analyze -c phpstan.dist.neon

name Since v0.3.2

Is required: true

Defines the name of the Test.

commands Since v0.3.2

Is required: false

Define the commands that should be executed for this test.

tests Since v0.3.2

Is required: false

Contains a list of existing test entries that should be executed on after another.

image Since v0.3.2

Is required: false

Defines the image that should used to run these commands. The default value is one of this images: PHP-CLI-Alpine. The selected PHP-Version is the currently set php-version in the webdev.yml.