From 4365bc4e2a913bc56883941a6a131e039f73b345 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 24 Mar 2025 15:39:06 +0100 Subject: [PATCH] Provide `--xdebug` flag to Behat --- .github/workflows/reusable-testing.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 0628999..9bc5755 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -406,12 +406,18 @@ jobs: WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock' WP_CLI_TEST_COVERAGE: ${{ matrix.coverage }} run: | + ARGS=() + + if [[ $WP_CLI_TEST_COVERAGE == 'true' ]]; then + ARGS+=("--xdebug") + fi + if [[ $RUNNER_DEBUG == '1' ]]; then - composer behat -- --format=pretty || composer behat-rerun -- --format=pretty - else - composer behat || composer behat-rerun + ARGS+=("--format=pretty") fi + composer behat -- "${ARGS[@]}" || composer behat-rerun -- "${ARGS[@]}" + - name: Retrieve list of coverage files id: coverage_files if: ${{ matrix.coverage }}