Skip to content

Commit d331011

Browse files
authored
Windows, Line endings, etc (statamic#5231)
1 parent 0a49566 commit d331011

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
* text eol=lf
2-
*.tar.gz text=auto
1+
* text=auto
2+
*.php eol=lf
33
/.github export-ignore
44
/tests export-ignore
55
.babelrc export-ignore

.github/workflows/tests.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@ jobs:
1616
php: [7.4, 7.3, 7.2, 8.0, 8.1]
1717
laravel: [8.*, 7.*, 6.*]
1818
stability: [prefer-lowest, prefer-stable]
19-
os: [ubuntu-20.04]
19+
os: [ubuntu-latest]
2020
include:
2121
- laravel: 8.*
2222
framework: ^8.24.0
2323
- laravel: 7.*
2424
framework: ^7.30.4
2525
- laravel: 6.*
2626
framework: ^6.20.14
27+
- os: windows-latest
28+
php: 8.0
29+
laravel: 8.*
30+
framework: ^8.24.0
31+
stability: prefer-stable
2732
exclude:
2833
- laravel: 8.*
2934
php: 7.2
@@ -32,7 +37,7 @@ jobs:
3237
- laravel: 6.*
3338
php: 8.1
3439

35-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ubuntu-latest
40+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3641

3742
steps:
3843
- name: Checkout code
@@ -42,19 +47,19 @@ jobs:
4247
uses: shivammathur/setup-php@v2
4348
with:
4449
php-version: ${{ matrix.php }}
45-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
50+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
4651
coverage: none
4752

4853
- name: Set PHP 7.4 Mockery
49-
run: composer require "mockery/mockery:>=1.2.3" --no-interaction --no-update
54+
run: composer require "mockery/mockery >=1.2.3" --no-interaction --no-update
5055
if: matrix.php >= 7.4 && matrix.php <8.0
5156

5257
- name: Set PHP 8 Mockery
53-
run: composer require "mockery/mockery:>=1.3.3" --no-interaction --no-update
58+
run: composer require "mockery/mockery >=1.3.3" --no-interaction --no-update
5459
if: matrix.php >= 8.0
5560

5661
- name: Set PHP 8.1 Testbench
57-
run: composer require "orchestra/testbench:^6.22.0" --no-interaction --no-update
62+
run: composer require "orchestra/testbench ^6.22.0" --no-interaction --no-update
5863
if: matrix.laravel == '8.*' && matrix.php >= 8.1
5964

6065
- name: Install dependencies

tests/Modifiers/WidontTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ public function modify($value, $params = [])
9999
/** @test */
100100
public function it_doesnt_add_nbsp_to_nested_list()
101101
{
102+
$this->markTestSkippedInWindows('TODO: Fix this test on Windows'); // TODO
103+
102104
$eol = PHP_EOL;
103105
$value = "<ul>$eol<li>Lorem ipsum dolor sit amet.$eol<ul>$eol<li>Consectetur adipiscing elit.</li>$eol</ul>$eol</li>$eol<li>Lorem ipsum dolor sit amet.</li>$eol</ul>$eol";
104106

tests/WindowsHelpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ protected static function isRunningWindows()
3131
return DIRECTORY_SEPARATOR === '\\';
3232
}
3333

34-
protected function markTestSkippedInWindows()
34+
protected function markTestSkippedInWindows(string $message = '')
3535
{
3636
if (static::isRunningWindows()) {
37-
$this->markTestSkipped();
37+
$this->markTestSkipped($message);
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)