-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Statamic 5 and Laravel 11 (#17)
- Loading branch information
Showing
21 changed files
with
163 additions
and
395 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 |
---|---|---|
|
@@ -8,14 +8,12 @@ jobs: | |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Run PHP CS Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga | ||
with: | ||
args: --config=.php_cs.dist.php --allow-risky=yes | ||
- name: Fix styling issues | ||
uses: aglipanci/[email protected] | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
|
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,37 +1,45 @@ | ||
name: Run Tests | ||
name: run-tests | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
on: ['push', 'pull_request'] | ||
|
||
jobs: | ||
phpunit: | ||
runs-on: ubuntu-latest | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.0] | ||
laravel: [9.*] | ||
os: [ubuntu-latest] | ||
php: [8.2, 8.3] | ||
laravel: [10.*, 11.*] | ||
stability: [prefer-lowest, prefer-stable] | ||
include: | ||
- laravel: 9.* | ||
testbench: ^7.5 | ||
- laravel: 10.* | ||
testbench: 8.* | ||
- laravel: 11.* | ||
testbench: 9.* | ||
|
||
name: PHP ${{ matrix.php }} – Laravel ${{ matrix.laravel }} - ${{ matrix.stability }} | ||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- 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 | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | ||
coverage: none | ||
|
||
- name: Setup problem matchers | ||
run: | | ||
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
- name: Run tests | ||
- name: Execute tests | ||
run: vendor/bin/phpunit |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
.idea | ||
.env | ||
.phpunit.result.cache | ||
.phpunit.cache | ||
.php_cs.cache | ||
.php-cs-fixer.cache | ||
coverage | ||
|
This file was deleted.
Oops, something went wrong.
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
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
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,26 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer"> | ||
<testsuites> | ||
<testsuite name="Test Suite"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
<php> | ||
<env name="APP_KEY" value="base64:xstw340kWV7AmdlgzjEAqc8pAQjcRJZ1UeHR5/LCAA4="/> | ||
</php> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" processIsolation="false" stopOnFailure="false" beStrictAboutTestsThatDoNotTestAnything="false" cacheDirectory=".phpunit.cache"> | ||
<testsuites> | ||
<testsuite name="Test Suite"> | ||
<directory suffix="Test.php">./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="APP_ENV" value="testing"/> | ||
<env name="APP_KEY" value="base64:ybcI9MKuhLnESRSuWDfnJQuohOXMBaynfbTC5Y5i1FE="/> | ||
<env name="BCRYPT_ROUNDS" value="4"/> | ||
<env name="CACHE_DRIVER" value="array"/> | ||
<!-- <env name="DB_CONNECTION" value="sqlite"/> --> | ||
<!-- <env name="DB_DATABASE" value=":memory:"/> --> | ||
<env name="MAIL_MAILER" value="array"/> | ||
<env name="QUEUE_CONNECTION" value="sync"/> | ||
<env name="SESSION_DRIVER" value="array"/> | ||
<env name="TELESCOPE_ENABLED" value="false"/> | ||
</php> | ||
<source/> | ||
</phpunit> |
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
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
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
Oops, something went wrong.