File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 6464
6565 runs-on : ${{ matrix.os }}
6666
67- defaults :
68- run :
69- shell : bash
70-
71-
7267 steps :
7368 - uses : actions/checkout@v2
7469
@@ -79,12 +74,12 @@ jobs:
7974 coverage : pcov
8075 tools : composer:v2
8176
82- # Fix for Windows: enable sockets if missing for package donatj/mock-webserver
77+ # Fix for Windows: enable sockets if missing for package donatj/mock-webserver (https://github.com/cebe/php-openapi/issues/236)
8378 - name : Enable sockets on Windows
8479 if : runner.os == 'Windows'
8580 run : |
86- echo "extension=sockets" >> /c/ tools/ php/ php.ini
87- php -m | grep -q sockets || { echo "sockets not enabled"; exit 1; }
81+ echo "extension=sockets" | Out-File -Append "C:\ tools\ php\ php.ini"
82+ php -m | findstr sockets || ( echo "sockets not enabled" && exit 1)
8883
8984 - name : Require specific symfony/yaml version
9085 run : " composer require symfony/yaml:'${{ matrix.symfony-yaml }}' --no-interaction --ansi --no-install"
10196 - name : Validate test data
10297 run : make lint
10398
99+ # - name: Add host to known_hosts
100+ # run: ssh-keyscan -H 192.168.1.10 | Out-File -Append -Encoding ASCII $env:USERPROFILE\.ssh\known_hosts
101+
104102 - name : PHPUnit tests
105103 run : make test
106104
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ protected function setUp(): void
2424 $ this ->server = new MockWebServer ();
2525 $ this ->server ->stop ();
2626 $ this ->server ->start ();
27+
28+ if (stripos (PHP_OS_FAMILY , 'Windows ' ) !== false ) {
29+ // echo "Running on Windows\n";
30+ exec ('ssh-keyscan -H ' .$ this ->server ->getHost ().' | Out-File -Append -Encoding ASCII $env:USERPROFILE\.ssh\known_hosts ' );
31+ }
2732 }
2833
2934 protected function tearDown (): void
You can’t perform that action at this time.
0 commit comments