Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
path: ./parallel-lint.phar

test:
name: Run tests on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
name: Run tests on PHP ${{ matrix.php }} (${{ matrix.os }})
runs-on: "${{ matrix.os }}"
continue-on-error: ${{ matrix.php == '8.5' }}
needs:
- bundle
Expand All @@ -115,6 +115,19 @@ jobs:
- '8.3'
- '8.4'
- '8.5'
os:
- 'ubuntu-latest'

include:
# Also run the tests against Windows on a few PHP versions.
- php: '5.5'
os: 'windows-latest'
- php: '7.0'
os: 'windows-latest'
- php: '8.0'
os: 'windows-latest'
- php: '8.3'
os: 'windows-latest'

steps:
- name: Checkout code
Expand Down Expand Up @@ -148,14 +161,15 @@ jobs:

- name: 'Integration test 1 - linting own code, no colors'
continue-on-error: true
run: ./parallel-lint --exclude vendor --exclude tests/fixtures --no-colors .
run: php "parallel-lint" --exclude vendor --exclude tests/fixtures --no-colors .

- name: 'Integration test 2 - linting own code'
run: ./parallel-lint --exclude vendor --exclude tests/fixtures .
run: php "parallel-lint" --exclude vendor --exclude tests/fixtures .

- name: Grab PHPUnit version
id: phpunit_version
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT
shell: bash
run: echo "VERSION=$(php "vendor/bin/phpunit" --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT

- name: "Run unit tests (PHPUnit < 10)"
if: ${{ ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
Expand All @@ -170,4 +184,4 @@ jobs:
name: parallel-lint-phar

- name: Run linter against codebase using the phar
run: php ./parallel-lint.phar --exclude vendor --exclude tests/fixtures .
run: php "parallel-lint.phar" --exclude vendor --exclude tests/fixtures .
Loading