Tachycardia is configured to hook into PHPUnit once it is included in your XML file. You can, however,
control this behavior by introducing the TACHYCARDIA_MONITOR
environment variable.
Add the env
element to your phpunit.xml.dist
file disabling Tachycardia then enable this on Actions:
<!-- phpunit.xml.dist -->
<phpunit bootstrap="vendor/autoload.php">
<!-- Other configurations -->
<php>
<env name="TACHYCARDIA_MONITOR" value="disabled" />
</php>
<extensions>
<bootstrap class="Nexus\PHPUnit\Tachycardia\TachycardiaExtension" />
</extensions>
</phpunit>
# your build workflow
- name: Run test suite
run: vendor/bin/phpunit --color=always
env:
TACHYCARDIA_MONITOR: enabled
<!-- phpunit.xml.dist -->
<phpunit bootstrap="vendor/autoload.php">
<!-- Other configurations -->
<extensions>
<bootstrap class="Nexus\PHPUnit\Tachycardia\TachycardiaExtension" />
</extensions>
</phpunit>
# your build workflow
- name: Run test suite
run: vendor/bin/phpunit --color=always
env:
TACHYCARDIA_MONITOR: disabled
<!-- phpunit.xml.dist -->
<phpunit bootstrap="vendor/autoload.php">
<!-- Other configurations -->
<php>
<env name="TACHYCARDIA_MONITOR" value="disabled" />
</php>
<extensions>
<bootstrap class="Nexus\PHPUnit\Tachycardia\TachycardiaExtension" />
</extensions>
</phpunit>
When running vendor/bin/phpunit
either from the terminal or from Github Actions, just pass the variable
like this:
$ TACHYCARDIA_MONITOR=enabled vendor/bin/phpunit
Profiling in development for the Github Actions is disabled by default because the console cannot
interpret the special workflow commands used by Github Actions. Using the TACHYCARDIA_MONITOR_GA
variable, you can enable it by exporting TACHYCARDIA_MONITOR_GA=enabled
. To disable, just export
TACHYCARDIA_MONITOR_GA=disabled
.
The steps here are similar to above procedures for setting TACHYCARDIA_MONITOR
variable.