Skip to content

Commit f7ef17c

Browse files
authored
Move the jobs related to static analysis and CS to a separate GA workflow (#403)
1 parent b874955 commit f7ef17c

File tree

3 files changed

+44
-29
lines changed

3 files changed

+44
-29
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Code style and static analysis
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 3.5.x
9+
10+
jobs:
11+
php-cs-fixer:
12+
name: PHP-CS-Fixer
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '7.4'
22+
23+
- name: Install dependencies
24+
run: composer update --no-progress --no-interaction --prefer-dist
25+
26+
- name: Run script
27+
run: composer phpcs
28+
29+
phpstan:
30+
name: PHPStan
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
39+
- name: Install dependencies
40+
run: composer update --no-progress --no-interaction --prefer-dist
41+
42+
- name: Run script
43+
run: composer phpstan

.github/workflows/tests.yaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,3 @@ jobs:
6565
with:
6666
file: './coverage.xml'
6767
fail_ci_if_error: true
68-
PHP-CS-Fixer:
69-
runs-on: ubuntu-latest
70-
name: Code style
71-
steps:
72-
- uses: actions/checkout@v2
73-
- uses: actions/cache@v2
74-
with:
75-
path: ~/.composer/cache/files
76-
key: '7.4'
77-
- uses: shivammathur/setup-php@v2
78-
with:
79-
php-version: '7.4'
80-
- run: composer install --no-progress --ansi
81-
- run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run
82-
PHPStan:
83-
runs-on: ubuntu-latest
84-
name: PHPStan
85-
steps:
86-
- uses: actions/checkout@v2
87-
- uses: actions/cache@v2
88-
with:
89-
path: ~/.composer/cache/files
90-
key: '7.4'
91-
- uses: shivammathur/setup-php@v2
92-
with:
93-
php-version: '7.4'
94-
- run: composer install --no-progress --ansi
95-
- run: vendor/bin/phpstan analyse

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"symfony/security-core": "^3.4||^4.0||^5.0"
3131
},
3232
"require-dev": {
33-
"friendsofphp/php-cs-fixer": "^2.16",
33+
"friendsofphp/php-cs-fixer": "^2.17",
3434
"jangregor/phpstan-prophecy": "^0.8",
3535
"monolog/monolog": "^1.3||^2.0",
3636
"phpspec/prophecy": "!=1.11.0",

0 commit comments

Comments
 (0)