diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b968690..9ed3c74 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -316,11 +316,18 @@ jobs: DB: ${{steps.database-type.outputs.db}} COVERAGE: ${{ matrix.COVERAGE == '1' && '1' || '0' }} run: | + args=() + if [ "$COVERAGE" == "1" ]; then + args+=(--coverage-clover build/logs/clover.xml) + fi + if [ "$FUNCTIONAL_TESTS" == "0" ]; then + args+=(--exclude-group functional) + fi + phpBB/vendor/bin/phpunit \ --configuration "phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml" \ --bootstrap ./tests/bootstrap.php \ - "$( [[ "$COVERAGE" == "1" ]] && echo "--coverage-clover build/logs/clover.xml" )" \ - "$( [[ "$FUNCTIONAL_TESTS" == "0" ]] && echo "--exclude-group functional" )" + "${args[@]}" working-directory: ./phpBB3 - name: Send code coverage @@ -465,10 +472,15 @@ jobs: env: DB: ${{steps.database-type.outputs.db}} run: | - phpBB/vendor/bin/phpunit \ - --configuration "phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml" \ - --bootstrap ./tests/bootstrap.php \ - "$( [[ "$FUNCTIONAL_TESTS" == "0" ]] && echo "--exclude-group functional" )" + args=() + if [ "$FUNCTIONAL_TESTS" == "0" ]; then + args+=(--exclude-group functional) + fi + + phpBB/vendor/bin/phpunit \ + --configuration "phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml" \ + --bootstrap ./tests/bootstrap.php \ + "${args[@]}" working-directory: ./phpBB3 # END PostgreSQL Job @@ -605,10 +617,15 @@ jobs: env: DB: ${{steps.database-type.outputs.db}} run: | + args=() + if [ "$FUNCTIONAL_TESTS" == "0" ]; then + args+=(--exclude-group functional) + fi + phpBB/vendor/bin/phpunit \ - --configuration "phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml" \ - --bootstrap ./tests/bootstrap.php \ - "$( [[ "$FUNCTIONAL_TESTS" == "0" ]] && echo "--exclude-group functional" )" + --configuration "phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml" \ + --bootstrap ./tests/bootstrap.php \ + "${args[@]}" working-directory: ./phpBB3 # END Other Tests Job