bump: EB-27298 Upgrade php8.4 #91
Workflow file for this run
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
name: PHP - Code quality | |
on: | |
pull_request: | |
env: | |
PHP_VERSION: 8.4.1 | |
jobs: | |
php_analysis: | |
name: Code quality checks | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
tool: [phpcs, phpmd, phpstan, phpunit] | |
steps: | |
- name: Setup PHP ${{ env.PHP_VERSION }} environment | |
uses: shivammathur/setup-php@b75c104ca87c371bbc71be81a4e5dd5a5d298241 # renovate: tag=v2.17.1 | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
- name: Fetch lastest changes | |
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # renovate: tag=v3.0.0 | |
- name: Restore dependencies cache | |
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # renovate: tag=v2.1.7 | |
with: | |
key: composer/${{ runner.os }}/${{ hashFiles('**/composer.json') }} | |
path: | | |
composer.lock | |
vendor/ | |
- name: Install/update dependencies | |
uses: php-actions/composer@d936bcb900310224b9089aff3337f2221a8df9a0 # renovate: tag=v6.0.0 | |
with: | |
php_version: ${{ env.PHP_VERSION }} | |
args: --ignore-platform-reqs | |
- name: Run ${{ matrix.tool }} | |
run: make ${{ matrix.tool }}-ci | |
- name: Upload ${{ matrix.tool }} reports | |
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # renovate: tag=v3.0.0 | |
if: always() | |
with: | |
name: ${{ matrix.tool }}-reports | |
path: build/**/*.junit.xml | |
retention-days: 1 | |
if-no-files-found: ignore | |
php_report: | |
name: Report PHP code quality | |
runs-on: ubuntu-latest | |
needs: [php_analysis] | |
if: always() | |
steps: | |
- name: Create build/ directory | |
run: mkdir -p build | |
# NOTE: only phpunit, phpcs generate reports | |
- name: Download phpunit reports | |
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # renovate: tag=v3.0.0 | |
with: | |
name: phpunit-reports | |
path: build/ | |
continue-on-error: true | |
- name: Download phpcs reports | |
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # renovate: tag=v3.0.0 | |
with: | |
name: phpcs-reports | |
path: build/ | |
continue-on-error: true | |
- name: Report analisys results | |
uses: mikepenz/action-junit-report@127c778ac944abc0f48a5103964304bab7eb208b # renovate: tag=v2.9.1 | |
with: | |
check_name: See PHP code quality reports | |
report_paths: build/reports/*.xml |