Skip to content

Commit acb9bdd

Browse files
committed
WIP fixing windows build, #90
1 parent 9f10d43 commit acb9bdd

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/php.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646
coverage: pcov
4747
tools: composer:v2
4848

49-
- name: Determine composer cache directory on Linux
49+
- name: Determine composer cache directory (Linux/MacOS)
5050
if: matrix.os != 'windows-latest'
5151
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
5252

53-
- name: Determine composer cache directory on Windows
53+
- name: Determine composer cache directory (Windows)
5454
if: matrix.os == 'windows-latest'
5555
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5656

@@ -64,7 +64,7 @@ jobs:
6464
- name: Validate composer.json and composer.lock
6565
run: composer validate --ansi
6666

67-
- name: Install dependencies (Linux)
67+
- name: Install dependencies (Linux/MacOS)
6868
if: matrix.os != 'windows-latest'
6969
run: |
7070
make install
@@ -73,7 +73,7 @@ jobs:
7373
- name: Install dependencies (Windows)
7474
if: matrix.os == 'windows-latest'
7575
run: |
76-
make install
76+
composer install --prefer-dist --no-interaction --no-progress --ansi
7777
composer require symfony/yaml:5.1.8 --prefer-dist --no-interaction --ansi
7878
7979
- name: Validate test data
@@ -84,9 +84,14 @@ jobs:
8484
if: matrix.os == 'ubuntu-latest'
8585
run: make stan
8686

87-
- name: PHPUnit tests
87+
- name: PHPUnit tests (Linux/MacOS)
88+
if: matrix.os != 'windows-latest'
8889
run: make test
8990

91+
- name: PHPUnit tests (Windows)
92+
if: matrix.os == 'windows-latest'
93+
run: vendor/phpunit/phpunit/phpunit --colors=always
94+
9095
- name: Check code style
9196
if: matrix.os == 'ubuntu-latest'
9297
run: make check-style

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ fix-style: php-cs-fixer.phar
1717
./php-cs-fixer.phar fix src/ --diff
1818

1919
install:
20-
composer install --prefer-dist --no-interaction --no-progress --no-suggest --ansi
20+
composer install --prefer-dist --no-interaction --no-progress --ansi
2121
yarn install
2222

2323
test:
24-
php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --verbose --color $(TESTCASE)
24+
php $(PHPARGS) $(XPHPARGS) vendor/bin/phpunit --verbose --colors=always $(TESTCASE)
2525
php $(PHPARGS) $(XPHPARGS) bin/php-openapi validate tests/spec/data/recursion.json
2626
php $(PHPARGS) $(XPHPARGS) bin/php-openapi validate tests/spec/data/recursion2.yaml
2727

0 commit comments

Comments
 (0)