Skip to content

Commit

Permalink
Merge pull request #53 from laravel/chore/tests-on-windows
Browse files Browse the repository at this point in the history
[0.x] Tests against windows
  • Loading branch information
nunomaduro authored Jun 27, 2022
2 parents 6e3ed12 + 2d26b6a commit 0efaa36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,30 @@ on:

jobs:
tests:
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04, windows-2019]
php: ['8.0', 8.1]

name: PHP ${{ matrix.php }}
name: PHP ${{ matrix.php }} - ${{ matrix.os }}

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
extensions: dom, curl, libxml, mbstring, zip, fileinfo
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
Expand Down
10 changes: 6 additions & 4 deletions tests/Feature/SummaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
->and($output)
->toContain('FAIL')
->toContain('1 file, 1 style issue')
->toContain('⨯ tests/Fixtures/with-fixable-issues/file.php')
->toContain('new_with_braces');
->toContain(sprintf('⨯ %s', implode(DIRECTORY_SEPARATOR, [
'tests', 'Fixtures', 'with-fixable-issues', 'file.php',
])))->toContain('new_with_braces');
});

it('may fail with errors', function () {
Expand All @@ -23,8 +24,9 @@
->and($output)
->toContain('FAIL')
->toContain('1 file, 1 error')
->toContain('! tests/Fixtures/with-non-fixable-issues/file.php')
->toContain('Parse error: syntax error');
->toContain(sprintf('! %s', implode(DIRECTORY_SEPARATOR, [
'tests', 'Fixtures', 'with-non-fixable-issues', 'file.php',
])))->toContain('Parse error: syntax error');
});

it('may pass', function () {
Expand Down

0 comments on commit 0efaa36

Please sign in to comment.