diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f70586a..71267be 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -33,12 +33,21 @@ jobs: override: true - name: Bash commands + if: runner.os == 'Linux' run: | git clone https://github.com/ewilan-riviere/scout.git cd scout cargo build --release cp target/release/scout /usr/local/bin + - name: Powershell commands + if: runner.os == 'Windows' + run: | + git clone https://github.com/ewilan-riviere/scout.git + cd scout + cargo build --release + set PATH=%PATH%;C:\scout\target\release + - name: Setup PHP uses: shivammathur/setup-php@v2 with: diff --git a/tests/FileListCommandTest.php b/tests/FileListCommandTest.php index adec2c9..797e907 100644 --- a/tests/FileListCommandTest.php +++ b/tests/FileListCommandTest.php @@ -10,13 +10,6 @@ expect($list->getFiles())->toBeArray(); expect($list->getFiles())->toHaveCount(7); - $list = FileList::make(PATH_TO_SCAN) - ->withScout('/usr/local/bin/scout') - ->run(); - - expect($list->getFiles())->toBeArray(); - expect($list->getFiles())->toHaveCount(7); - expect(fn () => FileList::make('non-existent-path') ->withScout() ->throwOnError() @@ -24,6 +17,15 @@ )->toThrow(Exception::class); }); +it('can list files with scout with path', function () { + $list = FileList::make(PATH_TO_SCAN) + ->withScout('/usr/local/bin/scout') + ->run(); + + expect($list->getFiles())->toBeArray(); + expect($list->getFiles())->toHaveCount(7); +})->skip(PHP_OS_FAMILY === 'Windows', 'Binary path is unix here'); + it('can list files with find', function () { $list = FileList::make(PATH_TO_SCAN) ->noMemoryLimit()