From 15f1652da765b1ad489b53d76afe1e1009e026ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jib=C3=A9=20Barth?= Date: Mon, 21 Jul 2025 16:41:35 +0200 Subject: [PATCH] [CI] Update PHPunit to use it through testApplication --- .github/workflows/sylius.yaml | 8 ++++---- Makefile | 8 ++------ phpunit.xml.dist | 9 ++++----- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/sylius.yaml b/.github/workflows/sylius.yaml index 62413fcf..15e307f9 100644 --- a/.github/workflows/sylius.yaml +++ b/.github/workflows/sylius.yaml @@ -94,10 +94,10 @@ jobs: - name: 'Doctrine Schema Validate - Run' run: 'vendor/bin/console doctrine:schema:validate --skip-sync' -# - -# name: 'Run PHPUnit' -# run: 'make phpunit' -# if: 'always() && steps.end-of-setup-sylius.outcome == ''success''' + - + name: 'Run PHPUnit' + run: 'make phpunit' + if: 'always() && steps.end-of-setup-sylius.outcome == ''success''' # - # name: 'Configure Behat' # run: 'make behat-configure' diff --git a/Makefile b/Makefile index 4da061a7..b3007cc4 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ reset: ## Remove dependencies rm -rf vendor .PHONY: reset -phpunit: phpunit-configure phpunit-run ## Run PHPUnit +phpunit: ## Run PHPUnit tests + ./vendor/bin/phpunit .PHONY: phpunit ### @@ -35,12 +36,7 @@ install-sylius: ${COMPOSER} require --dev sylius/test-application:"^${SYLIUS_VERSION}@alpha" -n -W # TODO: Remove alpha when stable ${COMPOSER} test-application:install -phpunit-configure: - cp phpunit.xml.dist ${TEST_DIRECTORY}/phpunit.xml - echo -e "\nMOCK_SERVER_HOST=localhost\nMOCK_SERVER_PORT=8987\n" >> ${TEST_DIRECTORY}/.env.test.local -phpunit-run: - ./vendor/bin/phpunit behat-configure: ## Configure Behat (cd ${TEST_DIRECTORY} && cp behat.yml.dist behat.yml) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8e5a0339..b01264ac 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,19 +1,18 @@ + bootstrap="vendor/sylius/test-application/config/bootstrap.php"> - vendor/payplug/sylius-payplug-plugin/tests/PHPUnit + tests/PHPUnit - - +