diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 31d202e..5b0197f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -46,11 +46,11 @@ jobs: coverage: pcov tools: composer:v2 - - name: Determine composer cache directory on Linux + - name: Determine composer cache directory (Linux/MacOS) if: matrix.os != 'windows-latest' run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - name: Determine composer cache directory on Windows + - name: Determine composer cache directory (Windows) if: matrix.os == 'windows-latest' run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append @@ -64,7 +64,7 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate --ansi - - name: Install dependencies (Linux) + - name: Install dependencies (Linux/MacOS) if: matrix.os != 'windows-latest' run: | make install @@ -73,7 +73,7 @@ jobs: - name: Install dependencies (Windows) if: matrix.os == 'windows-latest' run: | - make install + composer install --prefer-dist --no-interaction --no-progress --ansi composer require symfony/yaml:5.1.8 --prefer-dist --no-interaction --ansi - name: Validate test data @@ -84,9 +84,14 @@ jobs: if: matrix.os == 'ubuntu-latest' run: make stan - - name: PHPUnit tests + - name: PHPUnit tests (Linux/MacOS) + if: matrix.os != 'windows-latest' run: make test + - name: PHPUnit tests (Windows) + if: matrix.os == 'windows-latest' + run: vendor/phpunit/phpunit/phpunit --colors=always + - name: Check code style if: matrix.os == 'ubuntu-latest' run: make check-style diff --git a/Makefile b/Makefile index 72c05d9..627df52 100644 --- a/Makefile +++ b/Makefile @@ -17,11 +17,11 @@ fix-style: php-cs-fixer.phar ./php-cs-fixer.phar fix src/ --diff install: - composer install --prefer-dist --no-interaction --no-progress --no-suggest --ansi + composer install --prefer-dist --no-interaction --no-progress --ansi yarn install test: - php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --verbose --color $(TESTCASE) + php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --verbose --colors=always $(TESTCASE) php $(PHPARGS) $(XPHPARGS) bin/php-openapi validate tests/spec/data/recursion.json php $(PHPARGS) $(XPHPARGS) bin/php-openapi validate tests/spec/data/recursion2.yaml