Skip to content

Commit

Permalink
WIP fixing windows build, #90
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed Dec 23, 2020
1 parent 9f10d43 commit acb9bdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit acb9bdd

Please sign in to comment.