|
|
@@ -1,5 +1,5 @@
|
|
|
-# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
|
|
|
-# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
|
|
|
+# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
|
|
+# https://github.com/sebastianbergmann/phpunit/blob/main/.github/workflows/ci.yaml
|
|
|
|
|
|
on:
|
|
|
push:
|
|
|
@@ -11,6 +11,10 @@ on:
|
|
|
|
|
|
name: "Continuous Integration"
|
|
|
|
|
|
+env:
|
|
|
+ PHP_EXTENSIONS: fileinfo, gd, imagick, json, mbstring
|
|
|
+ PHP_INI_VALUES: memory_limit=-1, error_reporting=-1, display_errors=On
|
|
|
+
|
|
|
jobs:
|
|
|
|
|
|
static-code-analysis:
|
|
|
@@ -33,18 +37,18 @@ jobs:
|
|
|
|
|
|
steps:
|
|
|
- name: "Checkout"
|
|
|
- uses: actions/checkout@v3
|
|
|
+ uses: actions/checkout@v4
|
|
|
|
|
|
- name: "Install PHP"
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
with:
|
|
|
php-version: ${{ matrix.php-version }}
|
|
|
+ extensions: ast, ${{ env.PHP_EXTENSIONS }}
|
|
|
+ ini-values: ${{ env.PHP_INI_VALUES }}
|
|
|
coverage: none
|
|
|
- tools: pecl
|
|
|
- extensions: ast, fileinfo, gd, imagick, json, mbstring
|
|
|
|
|
|
- - name: "Update dependencies with composer"
|
|
|
- uses: ramsey/composer-install@v2
|
|
|
+ - name: "Install dependencies with composer"
|
|
|
+ uses: ramsey/composer-install@v3
|
|
|
|
|
|
- name: "Run phan"
|
|
|
run: php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
|
|
|
@@ -70,26 +74,28 @@ jobs:
|
|
|
|
|
|
steps:
|
|
|
- name: "Checkout"
|
|
|
- uses: actions/checkout@v3
|
|
|
+ uses: actions/checkout@v4
|
|
|
|
|
|
- name: "Install PHP with extensions"
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
with:
|
|
|
php-version: ${{ matrix.php-version }}
|
|
|
+ extensions: ${{ env.PHP_EXTENSIONS }}
|
|
|
+ ini-values: ${{ env.PHP_INI_VALUES }}
|
|
|
coverage: pcov
|
|
|
tools: pecl
|
|
|
- extensions: fileinfo, gd, imagick, json, mbstring
|
|
|
|
|
|
- name: "Install dependencies with composer"
|
|
|
- uses: ramsey/composer-install@v2
|
|
|
+ uses: ramsey/composer-install@v3
|
|
|
|
|
|
- - name: "Run tests with phpunit"
|
|
|
+ - name: "Run tests with PHPUnit"
|
|
|
run: php vendor/bin/phpunit --colors=always --configuration=phpunit.xml.dist
|
|
|
|
|
|
- name: "Send code coverage report to Codecov.io"
|
|
|
- uses: codecov/codecov-action@v3
|
|
|
+ uses: codecov/codecov-action@v4
|
|
|
with:
|
|
|
- files: .build/coverage/clover.xml
|
|
|
+ token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
+ files: .build/coverage/clover.xml
|
|
|
|
|
|
- name: "Send code coverage report to Codacy"
|
|
|
uses: codacy/codacy-coverage-reporter-action@v1
|