|
@@ -11,10 +11,10 @@ jobs:
|
|
|
env:
|
|
env:
|
|
|
extensions: bz2, dom, iconv, fileinfo, openssl, xml, zlib
|
|
extensions: bz2, dom, iconv, fileinfo, openssl, xml, zlib
|
|
|
key: cache-v1
|
|
key: cache-v1
|
|
|
- PHPUNIT_COVERAGE: 0
|
|
|
|
|
PHP_INI: date.timezone=UTC, memory_limit=-1, opcache.enable=1, opcache.enable_cli=1
|
|
PHP_INI: date.timezone=UTC, memory_limit=-1, opcache.enable=1, opcache.enable_cli=1
|
|
|
|
|
|
|
|
strategy:
|
|
strategy:
|
|
|
|
|
+ fail-fast: false
|
|
|
matrix:
|
|
matrix:
|
|
|
os:
|
|
os:
|
|
|
- ubuntu-latest
|
|
- ubuntu-latest
|
|
@@ -27,6 +27,7 @@ jobs:
|
|
|
- '8.2'
|
|
- '8.2'
|
|
|
- '8.3'
|
|
- '8.3'
|
|
|
- '8.4'
|
|
- '8.4'
|
|
|
|
|
+ - '8.5'
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
@@ -66,9 +67,8 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
php-version: ${{ matrix.php }}
|
|
php-version: ${{ matrix.php }}
|
|
|
extensions: ${{ env.extensions }}
|
|
extensions: ${{ env.extensions }}
|
|
|
- coverage: pcov
|
|
|
|
|
ini-values: ${{ env.PHP_INI }}
|
|
ini-values: ${{ env.PHP_INI }}
|
|
|
- tools: composer:v2, cs2pr
|
|
|
|
|
|
|
+ tools: composer:v2
|
|
|
|
|
|
|
|
-
|
|
-
|
|
|
name: Determine composer cache directory on Linux or MacOS
|
|
name: Determine composer cache directory on Linux or MacOS
|
|
@@ -80,11 +80,6 @@ jobs:
|
|
|
if: matrix.os == 'windows-latest'
|
|
if: matrix.os == 'windows-latest'
|
|
|
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
|
|
|
|
- -
|
|
|
|
|
- name: Set coverage args
|
|
|
|
|
- if: matrix.os == 'ubuntu-latest' && matrix.php == '7.4'
|
|
|
|
|
- run: echo "PHPUNIT_COVERAGE=1" >> $GITHUB_ENV
|
|
|
|
|
-
|
|
|
|
|
-
|
|
-
|
|
|
name: Cache composer dependencies
|
|
name: Cache composer dependencies
|
|
|
uses: actions/cache@v4
|
|
uses: actions/cache@v4
|
|
@@ -115,21 +110,35 @@ jobs:
|
|
|
|
|
|
|
|
-
|
|
-
|
|
|
name: Run tests with phpunit
|
|
name: Run tests with phpunit
|
|
|
- if: env.PHPUNIT_COVERAGE == 0
|
|
|
|
|
run: vendor/bin/phpunit -v --testsuite "all_tests" --group small,medium,large
|
|
run: vendor/bin/phpunit -v --testsuite "all_tests" --group small,medium,large
|
|
|
|
|
|
|
|
|
|
+ static-analysis:
|
|
|
|
|
+ name: Static analysis (Psalm)
|
|
|
|
|
+
|
|
|
|
|
+ runs-on: ubuntu-latest
|
|
|
|
|
+
|
|
|
|
|
+ env:
|
|
|
|
|
+ extensions: bz2, dom, iconv, fileinfo, openssl, xml, zlib
|
|
|
|
|
+ PHP_INI: date.timezone=UTC, memory_limit=-1
|
|
|
|
|
+
|
|
|
|
|
+ steps:
|
|
|
|
|
+ -
|
|
|
|
|
+ name: Checkout
|
|
|
|
|
+ uses: actions/checkout@v4
|
|
|
|
|
+
|
|
|
-
|
|
-
|
|
|
- name: Run tests with phpunit and coverage
|
|
|
|
|
- if: env.PHPUNIT_COVERAGE == 1
|
|
|
|
|
- run: vendor/bin/phpunit -v --coverage-clover=coverage.clover --testsuite "all_tests" --group small,medium,large
|
|
|
|
|
|
|
+ name: Install PHP with extensions
|
|
|
|
|
+ uses: shivammathur/setup-php@v2
|
|
|
|
|
+ with:
|
|
|
|
|
+ php-version: '8.4'
|
|
|
|
|
+ extensions: ${{ env.extensions }}
|
|
|
|
|
+ ini-values: ${{ env.PHP_INI }}
|
|
|
|
|
+ tools: composer:v2
|
|
|
|
|
|
|
|
-
|
|
-
|
|
|
- name: Static analysis
|
|
|
|
|
- run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize
|
|
|
|
|
|
|
+ name: Install dependencies with composer
|
|
|
|
|
+ run: composer update --prefer-dist --no-interaction --no-progress --ansi
|
|
|
|
|
|
|
|
-
|
|
-
|
|
|
- name: Upload code coverage scrutinizer
|
|
|
|
|
- if: env.PHPUNIT_COVERAGE == 1
|
|
|
|
|
- run: |
|
|
|
|
|
- wget https://scrutinizer-ci.com/ocular.phar
|
|
|
|
|
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
|
|
|
|
|
|
|
+ name: Run Psalm
|
|
|
|
|
+ run: vendor/bin/psalm --output-format=github
|