-
Notifications
You must be signed in to change notification settings - Fork 0
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 #5 from onmoon/ticket_3
php 8 compatibility, ci
- Loading branch information
Showing
18 changed files
with
493 additions
and
193 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,246 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
name: CI | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
|
||
env: | ||
PHP_EXTENSIONS: dom, mbstring, xml, bcmath | ||
PHP_INI_VALUES: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On | ||
|
||
jobs: | ||
unit: | ||
name: Unit tests ${{matrix.php-versions}} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: ['8.0'] | ||
phpunit-versions: ['latest'] | ||
compiler: | ||
- default | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.PHP_EXTENSIONS }} | ||
ini-values: ${{ env.PHP_INI_VALUES }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-versions }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Update dependencies with composer | ||
run: composer update --no-interaction --no-ansi --no-progress | ||
|
||
- name: Execute tests | ||
run: vendor/bin/phpunit | ||
|
||
psalm: | ||
name: Psalm ${{matrix.php-versions}} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: ['8.0'] | ||
phpunit-versions: ['latest'] | ||
compiler: | ||
- default | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.PHP_EXTENSIONS }} | ||
ini-values: ${{ env.PHP_INI_VALUES }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-versions }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Update dependencies with composer | ||
run: composer update --no-interaction --no-ansi --no-progress | ||
|
||
- name: Execute Psalm | ||
run: vendor/bin/psalm | ||
stan: | ||
name: PhpStan ${{matrix.php-versions}} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: ['8.0'] | ||
phpunit-versions: ['latest'] | ||
compiler: | ||
- default | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.PHP_EXTENSIONS }} | ||
ini-values: ${{ env.PHP_INI_VALUES }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-versions }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Update dependencies with composer | ||
run: composer update --no-interaction --no-ansi --no-progress | ||
|
||
- name: Execute PhpStan | ||
run: composer stan | ||
|
||
code-style: | ||
name: Code style ${{matrix.php-versions}} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: ['8.0'] | ||
phpunit-versions: ['latest'] | ||
compiler: | ||
- default | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.PHP_EXTENSIONS }} | ||
ini-values: ${{ env.PHP_INI_VALUES }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-versions }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Update dependencies with composer | ||
run: composer update --no-interaction --no-ansi --no-progress | ||
|
||
- name: Execute PhpCs | ||
run: composer cs | ||
|
||
security: | ||
name: Security check ${{matrix.php-versions}} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: ['8.0'] | ||
phpunit-versions: ['latest'] | ||
compiler: | ||
- default | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.PHP_EXTENSIONS }} | ||
ini-values: ${{ env.PHP_INI_VALUES }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-versions }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Update dependencies with composer | ||
run: composer update --no-interaction --no-ansi --no-progress | ||
|
||
- name: Execute security check | ||
run: composer sec |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# OnMoon Money | ||
|
||
[](https://github.com/onmoon/money/releases) | ||
[](https://travis-ci.org/onmoon/money) | ||
[](https://github.com/onmoon/money/actions) | ||
[](https://github.com/onmoon/money/blob/master/LICENSE) | ||
[](mailto:[email protected]) | ||
|
||
|
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,5 +1,6 @@ | ||
parameters: | ||
checkMissingIterableValueType: false | ||
reportUnmatchedIgnoredErrors: false | ||
includes: | ||
- vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon | ||
- vendor/roave/no-floaters/rules.neon |
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,20 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
colors="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
bootstrap="./tests/bootstrap.php" | ||
> | ||
<testsuites> | ||
<testsuite name="OnMoon Doctrine Money Test Suite"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>./src/</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" colors="true" beStrictAboutOutputDuringTests="true" beStrictAboutTodoAnnotatedTests="true" bootstrap="./tests/bootstrap.php"> | ||
<coverage> | ||
<include> | ||
<directory>./src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="OnMoon Doctrine Money Test Suite"> | ||
<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.