Fixed the logic to get the field name #20
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
# It checks the entire codebase | |
name: "Linter: PHPCS, PHPStan & PHPUnit with coverage" | |
on: [ push, pull_request ] | |
env: | |
fail-fast: true | |
permissions: | |
contents: read | |
jobs: | |
php-cs-fixer: | |
name: PHP-CS-Fixer | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# see https://github.com/OskarStark/php-cs-fixer-ga | |
- name: PHP-CS-Fixer | |
uses: docker://oskarstark/php-cs-fixer-ga | |
with: | |
args: --diff --dry-run | |
phpstan: | |
name: PHPStan & PHPUnit | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout code' | |
uses: actions/checkout@v3 | |
- name: 'Install PHP with extensions' | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: xdebug | |
php-version: 8.2 | |
tools: composer:v2 | |
extensions: mbstring, intl, pdo, pdo_sqlite, sqlite3 | |
ini-values: date.timezone=UTC | |
- name: 'Install project dependencies' | |
run: | | |
composer require --no-progress --no-scripts --no-plugins symfony/flex | |
composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable | |
vendor/bin/simple-phpunit install | |
- name: 'Run PHPStan analysis' | |
run: vendor/bin/phpstan analyse | |
- name: 'Run PHPUnit tests' | |
run: vendor/bin/simple-phpunit --coverage-clover clover.xml | |
- name: 'Run codacy-coverage-reporter' | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: clover.xml |