-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub Actions for Laravel 12
- Loading branch information
1 parent
1dc00eb
commit fd89229
Showing
1 changed file
with
51 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,55 @@ | ||
name: run-tests | ||
|
||
on: [pull_request] | ||
on: | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
if: "!contains(github.event.commits[0].message, '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.3] | ||
laravel: [11.*] | ||
include: | ||
- laravel: 11.* | ||
testbench: 9.* | ||
name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Decrypt services-account.json | ||
run: | | ||
gpg --quiet --batch --yes --decrypt --passphrase="$GOOGLE_SERVICES_SECRET" \ | ||
--output $GITHUB_WORKSPACE/tests/fixtures/service-account.json $GITHUB_WORKSPACE/tests/fixtures/service-account.json.gpg | ||
env: | ||
GOOGLE_SERVICES_SECRET: ${{ secrets.GOOGLE_SERVICES_SECRET }} | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/filesystem:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-suggest | ||
- name: Run Tests | ||
run: vendor/bin/phpunit | ||
test: | ||
if: "!contains(github.event.commits[0].message, '[skip ci]')" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: ['8.2', 8.3, '8.3', '8.4'] | ||
laravel: ['11.*', '12.*'] | ||
include: | ||
- laravel: 11.* | ||
testbench: 9.* | ||
- laravel: 12.* | ||
testbench: 10.* | ||
|
||
name: PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Decrypt services-account.json | ||
run: | | ||
gpg --quiet --batch --yes --decrypt --passphrase="$GOOGLE_SERVICES_SECRET" \ | ||
--output $GITHUB_WORKSPACE/tests/fixtures/service-account.json $GITHUB_WORKSPACE/tests/fixtures/service-account.json.gpg | ||
env: | ||
GOOGLE_SERVICES_SECRET: ${{ secrets.GOOGLE_SERVICES_SECRET }} | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/console:${{ matrix.laravel }}" "illuminate/filesystem:${{ matrix.laravel }}" "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-suggest | ||
- name: Run Tests | ||
run: vendor/bin/phpunit |