Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 (>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/
# e.g. test-recursion will run validation on tests/spec/data/recursion.json
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
...


Expand Down
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 2 additions & 0 deletions tests/spec/OpenApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Loading