From ee0f2d2b3ad3d296c94fe62da268566dd74b8310 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Fri, 12 Sep 2025 17:27:58 +0530 Subject: [PATCH 1/3] Initial commit to create PR --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d7cd0715..1c9bddea 100644 --- a/README.md +++ b/README.md @@ -332,3 +332,4 @@ Professional support, consulting as well as software development services are av https://www.cebe.cc/en/contact Development of this library is sponsored by [cebe.:cloud: "Your Professional Deployment Platform"](https://cebe.cloud). + From 33f5379f4e0cb0e8ae88b7bd2a569c56f031e2f6 Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Fri, 12 Sep 2025 18:04:18 +0530 Subject: [PATCH 2/3] Fix this issue --- .github/workflows/php.yml | 3 +++ Makefile | 5 ++++- README.md | 1 - composer.json | 2 -- tests/spec/OpenApiTest.php | 2 ++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index add9b3d7..4bb490fc 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -92,5 +92,8 @@ jobs: - name: PHPUnit tests run: make test + - name: PHPUnit gigantic tests + run: "composer require --dev apis-guru/openapi-directory nexmo/api-specification; make unit_gigantic" + - name: Code coverage run: make coverage diff --git a/Makefile b/Makefile index 7d9358f0..6c2e5742 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,10 @@ install: composer.json package.json test: unit test-recursion.json test-recursion2.yaml test-recursion3_index.yaml test-empty-maps.json unit: - $(DOCKER_PHP) php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --verbose --colors=always $(TESTCASE) + $(DOCKER_PHP) php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --exclude-group gigantic --verbose --colors=always $(TESTCASE) + +unit_gigantic: # run test which requires big packages: apis-guru/openapi-directory, nexmo/api-specification + $(DOCKER_PHP) php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --group gigantic --verbose --colors=always # test specific JSON files in tests/spec/data/ # e.g. test-recursion will run validation on tests/spec/data/recursion.json diff --git a/README.md b/README.md index 1c9bddea..d7cd0715 100644 --- a/README.md +++ b/README.md @@ -332,4 +332,3 @@ Professional support, consulting as well as software development services are av https://www.cebe.cc/en/contact Development of this library is sponsored by [cebe.:cloud: "Your Professional Deployment Platform"](https://cebe.cloud). - diff --git a/composer.json b/composer.json index 3dbff339..c73439ee 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,6 @@ "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.4", "oai/openapi-specification": "3.0.3", "mermade/openapi3-examples": "1.0.0", - "apis-guru/openapi-directory": "1.0.0", - "nexmo/api-specification": "1.0.0", "phpstan/phpstan": "^0.12.0 || ^1.9" }, "conflict": { diff --git a/tests/spec/OpenApiTest.php b/tests/spec/OpenApiTest.php index 433bd352..158908b9 100644 --- a/tests/spec/OpenApiTest.php +++ b/tests/spec/OpenApiTest.php @@ -184,7 +184,9 @@ public function specProvider() } /** + * This test requires 2 big packages (>778 MB): apis-guru/openapi-directory, nexmo/api-specification. So it is separated from running with other PHPUnit tests * @dataProvider specProvider + * @group gigantic */ public function testSpecs($openApiFile) { From 0f1f26aedfd67993c45f9d7b3f5b9ce73d59ae2e Mon Sep 17 00:00:00 2001 From: Sohel Ahmed Mesaniya Date: Mon, 15 Sep 2025 17:59:06 +0530 Subject: [PATCH 3/3] Add docs --- Makefile | 2 +- README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6c2e5742..1fd7f592 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ test: unit test-recursion.json test-recursion2.yaml test-recursion3_index.yaml t unit: $(DOCKER_PHP) php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --exclude-group gigantic --verbose --colors=always $(TESTCASE) -unit_gigantic: # run test which requires big packages: apis-guru/openapi-directory, nexmo/api-specification +unit_gigantic: # run test which requires big packages (>778 MB): apis-guru/openapi-directory, nexmo/api-specification $(DOCKER_PHP) php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --group gigantic --verbose --colors=always # test specific JSON files in tests/spec/data/ diff --git a/README.md b/README.md index d7cd0715..71334469 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,8 @@ You may use the docker environment for local development: docker-compose build make IN_DOCKER=1 install make IN_DOCKER=1 test + make IN_DOCKER=1 unit # run all tests except a big test (below) + make IN_DOCKER=1 unit_gigantic # run only a big test ...