Skip to content

Commit 5e3df49

Browse files
committed
Update github/workflows
1 parent db1ba8f commit 5e3df49

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

.github/workflows/lint.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,63 +32,56 @@ jobs:
3232
tools: composer:v2
3333

3434
- name: "Set composer cache directory"
35-
id: composer-cache
36-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
37-
38-
- name: "Cache composer"
39-
uses: actions/cache@v4
35+
id: cache-vendor
36+
uses: actions/cache@v3
4037
with:
41-
path: ${{ steps.composer-cache.outputs.dir }}
42-
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}
43-
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
38+
path: vendor
39+
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
4440

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

4845
- name: Install PHPUnit
4946
id: install
5047
run: vendor/bin/simple-phpunit install
5148

5249
- name: PHP-CS-Fixer
5350
if: always() && steps.install.outcome == 'success'
54-
run: vendor/bin/php-cs-fixer fix --diff --dry-run
51+
run: vendor/bin/php-cs-fixer fix --diff --dry-run --ansi
5552

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

6057
- name: Rector
6158
if: always() && steps.install.outcome == 'success'
62-
run: vendor/bin/rector process
59+
run: vendor/bin/rector process --ansi
6360

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

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

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

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

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

8481
- name: Lint Composer config
8582
if: always() && steps.install.outcome == 'success'
86-
run: composer validate --strict
87-
88-
- name: Download Symfony CLI
89-
if: always() && steps.install.outcome == 'success'
90-
run: wget https://get.symfony.com/cli/installer -O - | bash
83+
run: composer validate --strict --ansi
9184

9285
- name: Check if any dependencies are compromised
9386
if: always() && steps.install.outcome == 'success'
94-
run: /home/runner/.symfony5/bin/symfony check:security
87+
run: composer audit --ansi

0 commit comments

Comments
 (0)