Skip to content

Commit 2f6fdb8

Browse files
committed
pass behat args via step env
1 parent 035a655 commit 2f6fdb8

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

.github/workflows/testing.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -326,21 +326,9 @@ jobs:
326326
WP_CLI_TEST_DBTYPE: ${{ matrix.dbtype || 'mysql' }}
327327
WP_CLI_TEST_DBSOCKET: '${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock'
328328
WP_CLI_TEST_COVERAGE: ${{ matrix.coverage }}
329+
BEHAT_ARGS: ${{ matrix.coverage && env.RUNNER_DEBUG && '--debug --format=pretty' || matrix.coverage && '--debug' || env.RUNNER_DEBUG && '--format=pretty' || '' }}
329330
run: |
330-
ARGS=""
331-
332-
if [[ $WP_CLI_TEST_COVERAGE == 'true' ]]; then
333-
# The flag was only added in v3.17.0
334-
if composer behat -- --help 2>/dev/null | grep xdebug; then
335-
ARGS+=" --xdebug"
336-
fi
337-
fi
338-
339-
if [[ $RUNNER_DEBUG == '1' ]]; then
340-
ARGS+=" --format=pretty"
341-
fi
342-
343-
composer behat -- $ARGS || composer behat-rerun -- $ARGS
331+
composer behat -- $BEHAT_ARGS || composer behat-rerun -- $BEHAT_ARGS
344332
345333
- name: Retrieve list of coverage files
346334
id: coverage_files

0 commit comments

Comments
 (0)