Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 15 additions & 22 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,15 @@ jobs:
tools: composer:v2

- name: "Set composer cache directory"
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: "Cache composer"
uses: actions/cache@v4
id: cache-vendor
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}

- name: "Composer install"
run: composer install --no-interaction --no-progress
if: steps.cache-vendor.outputs.cache-hit != 'true'
run: composer install --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install PHPUnit
id: install
Expand All @@ -55,40 +52,36 @@ jobs:

- name: PHPStan
if: always() && steps.install.outcome == 'success'
run: vendor/bin/phpstan analyse
run: vendor/bin/phpstan analyse --ansi

- name: Rector
if: always() && steps.install.outcome == 'success'
run: vendor/bin/rector process
run: vendor/bin/rector process --ansi

- name: Lint YAML files
if: always() && steps.install.outcome == 'success'
run: ./bin/console lint:yaml config --parse-tags
run: ./bin/console lint:yaml config --parse-tags --ansi

- name: Lint Twig templates
if: always() && steps.install.outcome == 'success'
run: ./bin/console lint:twig templates --env=prod
run: ./bin/console lint:twig templates --env=prod --ansi

- name: Lint XLIFF translations
if: always() && steps.install.outcome == 'success'
run: ./bin/console lint:xliff translations
run: ./bin/console lint:xliff translations --ansi

- name: Lint Parameters and Services
if: always() && steps.install.outcome == 'success'
run: ./bin/console lint:container --no-debug
run: ./bin/console lint:container --no-debug --ansi

- name: Lint Doctrine entities
if: always() && steps.install.outcome == 'success'
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction --ansi

- name: Lint Composer config
if: always() && steps.install.outcome == 'success'
run: composer validate --strict

- name: Download Symfony CLI
if: always() && steps.install.outcome == 'success'
run: wget https://get.symfony.com/cli/installer -O - | bash
run: composer validate --strict --ansi

- name: Check if any dependencies are compromised
if: always() && steps.install.outcome == 'success'
run: /home/runner/.symfony5/bin/symfony check:security
run: composer audit --ansi
3 changes: 2 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
;

return (new PhpCsFixer\Config())
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
'@PHP80Migration:risky' => true,
Expand All @@ -37,5 +38,5 @@
'declare_strict_types' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache') // forward compatibility with 3.x line
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
;
Loading
Loading