diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a46bb2a1..b96141dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,7 @@ jobs: matrix: os: - ubuntu-latest + - windows-latest php-version: - "7.2" - "7.3" @@ -33,12 +34,20 @@ jobs: run: composer install --prefer-source --optimize-autoloader --ansi --no-interaction --no-dev - name: Install Box run: composer global require 'kherge/box=~2.7' --prefer-source - - name: Build pickle.phar - run: ~/.composer/vendor/bin/box build + - name: Build pickle.phar on Ubuntu + if: startsWith(matrix.os, 'ubuntu') + run: | + "$(composer global config bin-dir --absolute)/box" build + - name: Build pickle.phar on Windows + if: startsWith(matrix.os, 'windows') + run: | + & "$(composer global config bin-dir --absolute)/box.bat" build - name: Install Composer dependencies (including dev, preferring dist) run: composer install --optimize-autoloader --ansi --no-interaction - name: Run Behat - run: PICKLE_BEHAT_PROCESS_TIMEOUT=0 vendor/bin/behat --format=progress + env: + PICKLE_BEHAT_PROCESS_TIMEOUT: 0 + run: vendor/bin/behat --format=progress - name: Download Ocular run: curl -sSLf -o ocular.phar https://scrutinizer-ci.com/ocular.phar - name: Upload code coverage diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index b1795b0b..b06fb36f 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -86,7 +86,11 @@ public function prepare() private function moveToNewPath($path) { - $newWorkingDir = $this->workingDir .'/' . $path; + if ((string) $this->workingDir === '') { + $newWorkingDir = $path; + } else { + $newWorkingDir = $this->workingDir .'/' . $path; + } if (!file_exists($newWorkingDir)) { mkdir($newWorkingDir, 0777, true); diff --git a/features/pickle/convert-json.feature b/features/pickle/convert-json.feature index 235ad0ae..40b18c5f 100644 --- a/features/pickle/convert-json.feature +++ b/features/pickle/convert-json.feature @@ -80,7 +80,7 @@ Feature: convert package.xml to composer.json When I run "pickle convert" Then it should fail with: """ - The path '%%TEST_DIR%%/empty-dir' d + empty-dir' doesn't contain package.xml """ Given I am in the ".." path diff --git a/src/Package/PHP/Command/Install/Windows/Binary.php b/src/Package/PHP/Command/Install/Windows/Binary.php index e61eb17e..3e5b4585 100644 --- a/src/Package/PHP/Command/Install/Windows/Binary.php +++ b/src/Package/PHP/Command/Install/Windows/Binary.php @@ -36,7 +36,8 @@ namespace Pickle\Package\PHP\Command\Install\Windows; -use Symfony\Component\Console\Output\OutputInterface as OutputInterface; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Pickle\Base\Util\FileOps; use Pickle\Engine; use Pickle\Base\Archive; @@ -50,6 +51,7 @@ class Binary private $extName; private $extVersion; private $progress = null; + private $input = null; private $output = null; private $extDll = null; @@ -72,6 +74,11 @@ public function setProgress($progress) $this->progress = $progress; } + public function setInput(InputInterface $input) + { + $this->input = $input; + } + public function setOutput(OutputInterface $output) { $this->output = $output;