Add PHP 8.3 to GHA (#38) #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Master | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
version-latest: | |
name: Latest version Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-latest ] | |
php-versions: [ '8.1', '8.2', '8.3' ] | |
laravel-versions: [ '^10.0' ] | |
steps: | |
- uses: matriphe/laravel-pkg-test-action@v2 | |
with: | |
operating_system: ${{ matrix.operating-system }} | |
php_version: ${{ matrix.php-versions }} | |
laravel_version: ${{ matrix.laravel-versions }} | |
phpunit_args: --group unit | |
laravel_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins | |
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins | |
- name: Run Ubuntu Tests | |
run: vendor/bin/phpunit --group ubuntu | |
- name: Run Larinfo Command | |
run: php vendor/bin/testbench larinfo | |
# Note for PHP 8.0. | |
# For PHP 8.0, we need to force Laravel to use Symfony 6.0 instead of 6.1. Because some syntax support is missing. | |
# | |
# The error: | |
# PHP Parse error: syntax error, unexpected token ")" in path\vendor\symfony\finder\Finder.php on line 588 | |
# | |
# The reason: https://github.com/symfony/symfony/discussions/46540#discussioncomment-2861896 | |
version-4-0: | |
name: Version 4 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-latest ] | |
php-versions: [ '8.0', '8.1' ] | |
laravel-versions: [ '^9.0' ] | |
steps: | |
- id: composer-flag | |
name: Set Composer Flag based on PHP Version input | |
uses: haya14busa/action-cond@v1 | |
with: | |
cond: ${{ matrix.php-versions == '8.0' }} | |
if_true: '--ignore-platform-req=php+' | |
if_false: '' | |
- uses: matriphe/laravel-pkg-test-action@v2 | |
with: | |
operating_system: ${{ matrix.operating-system }} | |
php_version: ${{ matrix.php-versions }} | |
laravel_version: ${{ matrix.laravel-versions }} | |
phpunit_args: --group unit | |
laravel_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins ${{ steps.composer-flag.outputs.value }} | |
package_install_args: --prefer-dist --no-progress --no-suggest --optimize-autoloader --no-plugins ${{ steps.composer-flag.outputs.value }} | |
branch: 4.0.0 | |
- name: Run Ubuntu Tests | |
run: vendor/bin/phpunit --group ubuntu | |
- name: Run Larinfo Command | |
run: php vendor/bin/testbench larinfo | |
version-3: | |
name: Version 3.0.0 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-latest ] | |
php-versions: [ '7.4' ] | |
laravel-versions: [ '5.7.*', '^6.0', '^7.0', '^8.0' ] | |
steps: | |
- uses: matriphe/laravel-pkg-test-action@v2 | |
with: | |
operating_system: ${{ matrix.operating-system }} | |
php_version: ${{ matrix.php-versions }} | |
laravel_version: ${{ matrix.laravel-versions }} | |
phpunit_args: --group unit | |
branch: 3.0.0 | |
- name: Run Ubuntu Tests | |
run: vendor/bin/phpunit --group ubuntu | |
version-2: | |
name: Version 2.2 Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ ubuntu-latest ] | |
php-versions: [ '7.3', '7.4' ] | |
laravel-versions: [ '5.6.*' ] | |
steps: | |
- uses: matriphe/laravel-pkg-test-action@v2 | |
with: | |
operating_system: ${{ matrix.operating-system }} | |
php_version: ${{ matrix.php-versions }} | |
laravel_version: ${{ matrix.laravel-versions }} | |
phpunit_args: --group unit | |
branch: 2.2 | |
- name: Run Ubuntu Tests | |
run: vendor/bin/phpunit --group ubuntu |