mirror of
https://github.com/archtechx/jobpipeline.git
synced 2025-12-12 06:44:03 +00:00
L10 compatibility (#12)
* Bump dependencies for Laravel 10 * Update GitHub Actions for Laravel 10 * drop < L9 support * use `dispatch_sync` instead of `dispatch_now` * migrate phpunit configuration * update matrix format --------- Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
fe0fc363e6
commit
bfc53f6dd6
4 changed files with 36 additions and 39 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -8,7 +8,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
laravel: [6, 8, 9]
|
include:
|
||||||
|
- laravel: 9
|
||||||
|
php: 8.0
|
||||||
|
- laravel: 10
|
||||||
|
php: 8.1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -17,7 +21,7 @@ jobs:
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '8.0'
|
php-version: ${{matrix.php}}
|
||||||
|
|
||||||
- name: Start Redis
|
- name: Start Redis
|
||||||
uses: supercharge/redis-github-action@1.1.0
|
uses: supercharge/redis-github-action@1.1.0
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"illuminate/support": "^6.0|^8.0|^9.0"
|
"php": "^8.0",
|
||||||
|
"illuminate/support": "^9.0|^10.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"orchestra/testbench": "^4.0|^6.0|^7.0",
|
"orchestra/testbench": "^7.0|^8.0",
|
||||||
"spatie/valuestore": "^1.2",
|
"spatie/valuestore": "^1.2",
|
||||||
"ext-redis": "*"
|
"ext-redis": "*"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
60
phpunit.xml
60
phpunit.xml
|
|
@ -1,35 +1,27 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit backupGlobals="false"
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
|
||||||
backupStaticAttributes="false"
|
<coverage>
|
||||||
bootstrap="vendor/autoload.php"
|
<include>
|
||||||
colors="true"
|
<directory suffix=".php">./src</directory>
|
||||||
convertErrorsToExceptions="true"
|
</include>
|
||||||
convertNoticesToExceptions="true"
|
<exclude>
|
||||||
convertWarningsToExceptions="true"
|
<file>./src/routes.php</file>
|
||||||
processIsolation="false"
|
</exclude>
|
||||||
stopOnFailure="false">
|
</coverage>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Unit">
|
<testsuite name="Unit">
|
||||||
<directory suffix="Test.php">./tests</directory>
|
<directory suffix="Test.php">./tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<filter>
|
<php>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<env name="APP_ENV" value="testing"/>
|
||||||
<directory suffix=".php">./src</directory>
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<exclude>
|
<env name="CACHE_DRIVER" value="redis"/>
|
||||||
<file>./src/routes.php</file>
|
<env name="MAIL_DRIVER" value="array"/>
|
||||||
</exclude>
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
</whitelist>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
</filter>
|
<env name="DB_CONNECTION" value="sqlite"/>
|
||||||
<php>
|
<env name="DB_DATABASE" value=":memory:"/>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="AWS_DEFAULT_REGION" value="us-west-2"/>
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
</php>
|
||||||
<env name="CACHE_DRIVER" value="redis"/>
|
</phpunit>
|
||||||
<env name="MAIL_DRIVER" value="array"/>
|
|
||||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
|
||||||
<env name="DB_CONNECTION" value="sqlite"/>
|
|
||||||
<env name="DB_DATABASE" value=":memory:"/>
|
|
||||||
<env name="AWS_DEFAULT_REGION" value="us-west-2"/>
|
|
||||||
</php>
|
|
||||||
</phpunit>
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class JobPipeline implements ShouldQueue
|
||||||
if ($this->shouldBeQueued) {
|
if ($this->shouldBeQueued) {
|
||||||
dispatch($executable);
|
dispatch($executable);
|
||||||
} else {
|
} else {
|
||||||
dispatch_now($executable);
|
dispatch_sync($executable);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue