Skip to content

Commit 2e25f09

Browse files
authored
Merge pull request #124 from wp-cli/add/behat-xdebug-flag
Provide `--xdebug` flag to Behat
2 parents f8bae5d + 4365bc4 commit 2e25f09

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/reusable-testing.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,18 @@ jobs:
406406
WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock'
407407
WP_CLI_TEST_COVERAGE: ${{ matrix.coverage }}
408408
run: |
409+
ARGS=()
410+
411+
if [[ $WP_CLI_TEST_COVERAGE == 'true' ]]; then
412+
ARGS+=("--xdebug")
413+
fi
414+
409415
if [[ $RUNNER_DEBUG == '1' ]]; then
410-
composer behat -- --format=pretty || composer behat-rerun -- --format=pretty
411-
else
412-
composer behat || composer behat-rerun
416+
ARGS+=("--format=pretty")
413417
fi
414418
419+
composer behat -- "${ARGS[@]}" || composer behat-rerun -- "${ARGS[@]}"
420+
415421
- name: Retrieve list of coverage files
416422
id: coverage_files
417423
if: ${{ matrix.coverage }}

0 commit comments

Comments
 (0)