Skip to content

Commit

Permalink
Run PHPUnit tests on Windows too
Browse files Browse the repository at this point in the history
No need to run other tests and also when using include and exclude in strategy.matrix, it gets a bit complicated with what's being overwritten or added instead and I ended up with empty matrix.operating-system and would have to specify it explicitly I think.
  • Loading branch information
spaze committed Feb 6, 2023
1 parent 8ca05ab commit 0897dc7
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: PHP Tests
on: [push, pull_request]

jobs:
build:

lint-phpcs-phpstan:
runs-on: ubuntu-latest

strategy:
Expand All @@ -20,7 +19,6 @@ jobs:
- composer lint
- composer phpcs
- composer phpstan
- composer phpunit
exclude:
- php-version: "7.2"
run: composer lint
Expand Down Expand Up @@ -65,3 +63,39 @@ jobs:

- name: Run tests
run: ${{ matrix.run }}

phpunit:
runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- ubuntu-latest
- windows-latest

steps:
- uses: actions/checkout@v3

- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: PHP info
run: |
php -v
php -m
- name: Install dependencies
run: composer update --no-progress --no-interaction

- name: Run tests
run: composer phpunit

0 comments on commit 0897dc7

Please sign in to comment.