Skip to content

Commit

Permalink
Update GitHub Actions for Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
laravel-shift committed Feb 27, 2024
1 parent 490d014 commit 20350b9
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 38 deletions.
123 changes: 98 additions & 25 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,31 @@ on:
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' ]
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'




steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -26,39 +40,56 @@ jobs:
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

- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo

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' ]
operating-system: [ubuntu-latest]
php-versions: ['8.0', '8.1', '8.2']
laravel-versions: ['11.0', ^9.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.0'
- laravel-versions: '11.0'
php-versions: '8.1'




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_true: --ignore-platform-req=php+
if_false: ''




- uses: matriphe/laravel-pkg-test-action@v2
with:
operating_system: ${{ matrix.operating-system }}
Expand All @@ -69,22 +100,42 @@ jobs:
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' ]
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.2']
laravel-versions: ['5.7.*', '11.*', ^6.0, ^7.0, ^8.0]
exclude:
- laravel-versions: 11.*
php-versions: '7.4'




steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -94,19 +145,38 @@ jobs:
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.*' ]
operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4', '8.2']
laravel-versions: ['5.6.*', '11.*']
exclude:
- laravel-versions: 11.*
php-versions: '7.3'
- laravel-versions: 11.*
php-versions: '7.4'




steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -116,5 +186,8 @@ jobs:
phpunit_args: --group unit
branch: 2.2




- name: Run Ubuntu Tests
run: vendor/bin/phpunit --group ubuntu
71 changes: 58 additions & 13 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@ on:
- reopened
- synchronize


jobs:
ubuntu-laravel-10:
name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}



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



strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-20.04, ubuntu-22.04 ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-versions: [ '^10.0' ]
operating-system: [ubuntu-20.04, ubuntu-22.04]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'



steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -28,22 +39,37 @@ jobs:
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


macos-laravel-10:
name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}



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



strategy:
fail-fast: false
matrix:
operating-system: [ macos-12, macos-13 ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-versions: [ '^10.0' ]
operating-system: [macos-12, macos-13]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'



steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -54,23 +80,38 @@ jobs:
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 MacOS Tests
run: vendor/bin/phpunit --group macos



- name: Run Larinfo Command
run: php vendor/bin/testbench larinfo


windows-laravel-10:
name: Laravel ${{ matrix.laravel-versions }} PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }} without com_dotnet



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



strategy:
fail-fast: false
matrix:
operating-system: [ windows-2019, windows-2022 ]
php-versions: [ '8.1', '8.2', '8.3' ]
laravel-versions: [ '^10.0' ]
php-extension: [ 'pdo_sqlite,sqlite3,fileinfo' , 'pdo_sqlite,sqlite3,fileinfo,com_dotnet']
operating-system: [windows-2019, windows-2022]
php-versions: ['8.1', '8.2', '8.3']
laravel-versions: ['11.0', ^10.0]
php-extension: ['8.2', 'pdo_sqlite,sqlite3,fileinfo', 'pdo_sqlite,sqlite3,fileinfo,com_dotnet']
exclude:
- laravel-versions: '11.0'
php-versions: '8.1'



steps:
- uses: matriphe/laravel-pkg-test-action@v2
with:
Expand All @@ -83,10 +124,14 @@ jobs:
php_extensions: ${{ matrix.php-extension }}
shell_name: pwsh



- name: Run Windows Tests
shell: pwsh
run: vendor/bin/phpunit --group windows



- name: Run Larinfo Command
shell: pwsh
run: php vendor/bin/testbench larinfo

0 comments on commit 20350b9

Please sign in to comment.