-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test on PHP 7.4 and 8+
- Loading branch information
Showing
15 changed files
with
325 additions
and
289 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: PHP | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php: 7.4 | ||
composer: '--prefer-lowest' | ||
desc: "Lowest versions" | ||
- php: 7.4 | ||
- php: 8.0 | ||
- php: 8.1 | ||
- php: 8.2 | ||
coverage: '--coverage-clover /tmp/clover.xml' | ||
- php: 8.3 | ||
name: PHP ${{ matrix.php }} ${{ matrix.desc }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: xdebug | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-dist --no-progress ${{ matrix.composer }} | ||
|
||
- name: Run PHPUnit | ||
run: vendor/bin/phpunit ${{ matrix.coverage }} | ||
|
||
- name: Upload Scrutinizer coverage | ||
uses: sudo-bot/action-scrutinizer@latest | ||
if: ${{ matrix.coverage }} | ||
with: | ||
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}" |
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,3 +1,4 @@ | ||
/vendor | ||
/composer.lock | ||
.phpunit.result.cache | ||
.idea |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
parameters: | ||
level: 5 | ||
paths: | ||
- src | ||
|
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,24 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit | ||
colors="true" | ||
bootstrap="vendor/autoload.php" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
> | ||
<testsuites> | ||
<testsuite name="tests"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log type="coverage-text" target="php://stdout"/> | ||
</logging> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="tests"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</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
Oops, something went wrong.