-
Hello, I try to configure grumphp to use phpunit. grumphp:
ignore_unstaged_changes: true
stop_on_failure: true
parallel:
enabled: true
max_workers: 32
fixer:
enabled: false
fix_by_default: false
environment:
files: []
variables: {}
paths: []
tasks:
composer: ~
phpunit:
always_execute: true
testsuite: 'dxp-unit'
exclude_group:
- 'excluded-tests'
metadata:
priority: 101 but the phpunit doesn't seem to run all the test on the pre-commit or the pre-push. How to configure gumphp or the pre-commit hook to run all the tests ? here the basic pre-commit generated by grumphp init #!/bin/sh
DIFF=$(git -c diff.mnemonicprefix=false -c diff.noprefix=false --no-pager diff -r -p -m -M --full-index --no-color --staged | cat)
export GRUMPHP_GIT_WORKING_DIR="$(git rev-parse --show-toplevel)"
(cd "./" && printf "%s\n" "${DIFF}" | exec 'vendor/bin/grumphp' 'git:pre-commit' '--skip-success-output') |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The Lines 58 to 63 in d6ba4be Do note that you configured specific testsuites which might filter the tests as well. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer, Actually, the unit tests are running. To prove it, I added this configuration to my phpunit.xml file: <logging>
<testdoxText outputFile="testdox.txt"/>
</logging> the testdox.txt is created and shows all the test results. The test execution is really fast, so I thought they were not running. Maybe adding a summary of the executed tests could be a good idea. |
Beta Was this translation helpful? Give feedback.
Thanks for the answer,
Actually, the unit tests are running. To prove it, I added this configuration to my phpunit.xml file:
the testdox.txt is created and shows all the test results.
The test execution is really fast, so I thought they were not running. Maybe adding a summary of the executed tests could be a good idea.