To run unit tests in a specific location, one can use the unit_test_subset_path
- name: 'This step will execute specific unit tests in the path dir'
uses: MAD-I-T/magento-actions@v3.10
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'unit-test'
elasticsearch: 1
unit_test_subset_path: 'vendor/magento/module-email/Test/Unit'
To run magento unit tests with custom config specify the path to the new config file through unit_test_config argument.
For example copy the default config dev/tests/unit/phpunit.xml.dist to dev/tests/unit/phpunit.xml and adapt the config to your liking. Then commit the later and call the magento-actions as follows:
In which case you just have to specify the path of your code to test here the code is one level above the magento root project so the unit testing is done from the code in the parent dir ../Madit/Sips2