-
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.
Merge pull request #4 from denisyukphp/3.0.x
Upgrade package
- Loading branch information
Showing
14 changed files
with
171 additions
and
94 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 |
---|---|---|
|
@@ -10,3 +10,6 @@ indent_size = 4 | |
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,41 +1,108 @@ | ||
name: CI | ||
name: 'CI' | ||
|
||
on: ['push', 'pull_request'] | ||
on: | ||
push: | ||
paths-ignore: | ||
- 'LICENSE' | ||
- 'README.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'LICENSE' | ||
- 'README.md' | ||
|
||
jobs: | ||
phpunit: | ||
name: PHPUnit | ||
php-parallel-lint: | ||
name: 'PHPParallelLint' | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: latest | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run PHPParallelLint | ||
run: composer php-parallel-lint -- --no-progress --ignore-fails | ||
|
||
psalm: | ||
name: 'Psalm' | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: latest | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run Psalm | ||
run: composer psalm -- --no-progress --no-cache --output-format=github | ||
|
||
php-cs-fixer: | ||
name: 'PHPCsFixer' | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: latest | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run PHPCsFixer | ||
run: composer php-cs-fixer:diff -- --no-interaction --using-cache=no | ||
|
||
phpunit: | ||
name: 'PHPUnit' | ||
needs: ['php-parallel-lint', 'psalm', 'php-cs-fixer'] | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ['8.0', '8.1'] | ||
stability: ['prefer-lowest', 'prefer-stable'] | ||
operating-system: | ||
- 'ubuntu-latest' | ||
- 'windows-latest' | ||
php-version: | ||
- '8.0' | ||
- '8.1' | ||
composer-dependency: | ||
- 'lowest' | ||
- 'highest' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache Composer | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: composer:v2 | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
|
||
- name: Update Composer | ||
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress | ||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: ${{ matrix.composer-dependency }} | ||
|
||
- name: Run PHPUnit | ||
run: vendor/bin/phpunit --verbose --no-interaction | ||
run: composer phpunit -- --no-interaction --do-not-cache-result |
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,8 +1,5 @@ | ||
/.idea/ | ||
/.php-cs-fixer.php | ||
/.php-cs-fixer.cache | ||
/.phpunit.result.cache | ||
/composer.lock | ||
/phpunit.xml | ||
/psalm.xml | ||
/vendor/ |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
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,10 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="./vendor/autoload.php"> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="./vendor/autoload.php" | ||
cacheResultFile="./build/cache/phpunit.cache" | ||
> | ||
<testsuites> | ||
<testsuite name="TmpFile"> | ||
<testsuite name="tmpfile"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage | ||
processUncoveredFiles="true" | ||
cacheDirectory="./build/cache/phpunit-coverage/" | ||
> | ||
<include> | ||
<directory suffix=".php">./src/</directory> | ||
</include> | ||
</coverage> | ||
</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,19 @@ | ||
<?xml version="1.0" ?> | ||
<psalm | ||
errorLevel="1" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config ./vendor/vimeo/psalm/config.xsd" | ||
cacheDirectory="./build/cache/psalm/" | ||
> | ||
<projectFiles> | ||
<directory name="./src/" /> | ||
<directory name="./tests/" /> | ||
<ignoreFiles> | ||
<directory name="./vendor/" /> | ||
</ignoreFiles> | ||
</projectFiles> | ||
<plugins> | ||
<pluginClass class="Psalm\PhpUnitPlugin\Plugin" /> | ||
</plugins> | ||
</psalm> |
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