-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
339 additions
and
252 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,50 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- "**.php" | ||
- ".github/workflows/tests.yml" | ||
- "phpunit.xml.dist" | ||
- "composer.json" | ||
- "composer.lock" | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
php: [8.3, 8.2] | ||
stability: [prefer-lowest, prefer-stable] | ||
|
||
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
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, 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 update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
|
||
- name: List Installed Dependencies | ||
run: composer show -D | ||
|
||
- name: Execute tests | ||
env: | ||
GEOCODIO_API_KEY: ${{ secrets.GEOCODIO_API_KEY }} | ||
run: vendor/bin/pest --ci --parallel |
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ docs | |
vendor | ||
coverage | ||
.phpunit.result.cache | ||
.phpunit.cache | ||
phpunit.xml |
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 |
---|---|---|
@@ -1,22 +1,13 @@ | ||
<?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"> | ||
<testsuites> | ||
<testsuite name="Geocodio Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src/</directory> | ||
</whitelist> | ||
</filter> | ||
<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/11.3/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> | ||
<testsuites> | ||
<testsuite name="Geocodio Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; | ||
use Rector\Config\RectorConfig; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
use Rector\Set\ValueObject\SetList; | ||
|
||
return RectorConfig::configure() | ||
->withParallel() | ||
->withPaths([ | ||
__DIR__.'/src', | ||
__DIR__.'/tests', | ||
]) | ||
->withRules([ | ||
InlineConstructorDefaultToPropertyRector::class, | ||
]) | ||
->withSets([ | ||
LevelSetList::UP_TO_PHP_83, | ||
SetList::CODE_QUALITY, | ||
SetList::DEAD_CODE, | ||
SetList::EARLY_RETURN, | ||
SetList::TYPE_DECLARATION, | ||
SetList::PRIVATIZATION, | ||
]); |
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 |
---|---|---|
|
@@ -4,7 +4,4 @@ | |
|
||
use Exception; | ||
|
||
class GeocodioException extends Exception | ||
{ | ||
|
||
} | ||
class GeocodioException extends Exception {} |
Oops, something went wrong.