-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added laravel 10, PHP 8.2 support and GitHub actions
- Loading branch information
Showing
30 changed files
with
256 additions
and
216 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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Lint | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
lint_with_php_cs_fixer: | ||
name: Lint code with PHP-CS-Fixer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: php-actions/composer@v6 | ||
with: | ||
command: install | ||
only_args: -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --ignore-platform-reqs | ||
php_version: 8.1 | ||
|
||
- name: Run PHP-CS-Fixer | ||
run: vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --dry-run | ||
|
||
lint_with_phpcs: | ||
name: Lint code with PHP CodeSniffer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: php-actions/composer@v6 | ||
with: | ||
command: install | ||
only_args: -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --ignore-platform-reqs | ||
php_version: 8.1 | ||
|
||
- name: Run PHP CodeSniffer | ||
run: vendor/bin/phpcs --extensions=php |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Unit Test | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
PHPUnit: | ||
strategy: | ||
matrix: | ||
include: | ||
# Laravel 10.* | ||
- php: 8.1 | ||
laravel: 10.* | ||
testbench: 8.* | ||
composer-flag: '--prefer-stable' | ||
- php: 8.2 | ||
laravel: 10.* | ||
testbench: 8.* | ||
composer-flag: '--prefer-stable' | ||
- php: 8.1 | ||
laravel: 10.* | ||
testbench: 8.* | ||
composer-flag: '--prefer-lowest' | ||
- php: 8.2 | ||
laravel: 10.* | ||
testbench: 8.* | ||
composer-flag: '--prefer-lowest' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv | ||
coverage: xdebug | ||
|
||
- name: Install dependencies | ||
run: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
|
||
- name: Update dependencies | ||
run: composer update ${{ matrix.composer-flag }} --prefer-dist --no-interaction | ||
|
||
- name: Run PHPUnit | ||
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 |
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 |
---|---|---|
|
@@ -20,3 +20,4 @@ composer.lock | |
.php_cs.cache | ||
.php-cs-fixer.cache | ||
.phpunit.result.cache | ||
.phpunit.cache |
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 was deleted.
Oops, something went wrong.
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
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,38 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Feature"> | ||
<directory>tests/Feature</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="APP_ENV" value="testing"/> | ||
<env name="CACHE_DRIVER" value="array"/> | ||
<env name="SESSION_DRIVER" value="array"/> | ||
<env name="QUEUE_DRIVER" value="sync"/> | ||
<env name="DB_CONNECTION" value="sqlite"/> | ||
<env name="DB_DATABASE" value=":memory:"/> | ||
<server name="APP_ENV" value="testing"/> | ||
<server name="CACHE_DRIVER" value="array"/> | ||
<server name="SESSION_DRIVER" value="array"/> | ||
<server name="QUEUE_DRIVER" value="sync"/> | ||
<server name="DB_CONNECTION" value="sqlite"/> | ||
<server name="DB_DATABASE" value=":memory:"/> | ||
</php> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Feature"> | ||
<directory>tests/Feature</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="APP_ENV" value="testing"/> | ||
<env name="CACHE_DRIVER" value="array"/> | ||
<env name="SESSION_DRIVER" value="array"/> | ||
<env name="QUEUE_DRIVER" value="sync"/> | ||
<env name="DB_CONNECTION" value="sqlite"/> | ||
<env name="DB_DATABASE" value=":memory:"/> | ||
<server name="APP_ENV" value="testing"/> | ||
<server name="CACHE_DRIVER" value="array"/> | ||
<server name="SESSION_DRIVER" value="array"/> | ||
<server name="QUEUE_DRIVER" value="sync"/> | ||
<server name="DB_CONNECTION" value="sqlite"/> | ||
<server name="DB_DATABASE" value=":memory:"/> | ||
</php> | ||
</phpunit> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.