Skip to content

Commit fe9eb29

Browse files
Move lint to own CI task
1 parent 68328db commit fe9eb29

File tree

4 files changed

+33
-32
lines changed

4 files changed

+33
-32
lines changed

.env.dist

-24
This file was deleted.

.github/workflows/test-application.yaml

+28-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
env:
16-
DATABASE_URL: mysql://root:[email protected]:3306/sulu_test?serverVersion=5.7
16+
DATABASE_URL: mysql://root:[email protected]:3306/sulu_test?serverVersion=8.0
1717

1818
strategy:
1919
fail-fast: false
@@ -96,11 +96,33 @@ jobs:
9696
run: composer initialize
9797
env: ${{ matrix.env }}
9898

99-
- name: Lint code
100-
if: ${{ matrix.lint }}
101-
run: composer lint
102-
env: ${{ matrix.env }}
103-
10499
- name: Execute test cases
105100
run: time composer test -- --config ${{ matrix.phpunit-config || 'phpunit.xml.dist' }}
106101
env: ${{ matrix.env }}
102+
103+
lint:
104+
name: "PHP Lint"
105+
runs-on: ubuntu-latest
106+
107+
env:
108+
DATABASE_URL: mysql://root:[email protected]:3306/sulu_test?serverVersion=8.0
109+
110+
steps:
111+
- name: Checkout project
112+
uses: actions/checkout@v2
113+
114+
- name: Install and configure PHP
115+
uses: shivammathur/setup-php@v2
116+
with:
117+
php-version: 8.3
118+
extensions: 'ctype, iconv, mysql, imagick'
119+
tools: 'composer:v2'
120+
coverage: none
121+
122+
- name: Install composer dependencies
123+
uses: ramsey/composer-install@v2
124+
with:
125+
dependency-versions: highest
126+
127+
- name: Lint code
128+
run: composer lint

composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@
6262
"@php-cs"
6363
],
6464
"phpunit": "vendor/bin/phpunit",
65-
"phpstan": "vendor/bin/phpstan analyze -c ./phpstan.neon . -l 5",
65+
"phpstan": [
66+
"Tests/Application/console cache:warmup --env dev",
67+
"vendor/bin/phpstan analyze -c ./phpstan.neon . -l 5"
68+
],
6669
"php-cs": "vendor/bin/php-cs-fixer fix --verbose --diff --dry-run",
6770
"php-cs-fix": "vendor/bin/php-cs-fixer fix"
6871
}

phpstan.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ includes:
77
parameters:
88
paths:
99
- .
10-
excludes_analyse:
10+
excludePaths:
1111
- %currentWorkingDirectory%/DependencyInjection/Configuration.php
1212
- %currentWorkingDirectory%/EventSubscriber/AutoLoginSubscriber.php
1313
- %currentWorkingDirectory%/Middleware/EventMiddleware.php

0 commit comments

Comments
 (0)