Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: run tests also on Windows OS #1

Closed
wants to merge 25 commits into from
Closed
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
32 changes: 13 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,20 @@ 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.4' }}
needs:
- bundle

strategy:
matrix:
php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
include:
# Also run the tests against Windows on a few PHP versions.
- php: '8.0'
os: 'windows-latest'
- php: '8.3'
os: 'windows-latest'

steps:
- name: Checkout code
Expand Down Expand Up @@ -154,7 +145,10 @@ jobs:

- 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 '[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT

- run: ${{steps.phpunit_version.outputs.VERSION}}

- name: "Run unit tests (PHPUnit < 10)"
if: ${{ ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
Expand All @@ -169,4 +163,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