Skip to content

Commit ff47005

Browse files
Update code analysis
1 parent b617562 commit ff47005

1 file changed

Lines changed: 59 additions & 54 deletions

File tree

Lines changed: 59 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,71 @@
11
name: Code Analysis
22

33
on:
4-
pull_request: null
5-
push:
6-
branches:
7-
- main
4+
pull_request: null
5+
push:
6+
branches:
7+
- main
88

9-
jobs:
10-
rector_analysis:
11-
name: Rector analysis
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
16-
- uses: shivammathur/setup-php@v2
17-
with:
18-
php-version: 8.4
19-
extensions: json, mbstring, pdo, curl, pdo_sqlite
20-
coverage: none
21-
tools: symfony-cli
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9+
env:
10+
COMPOSER_HOME: /tmp/composer-cache
2411

25-
- run: composer install --no-progress --ansi
26-
27-
- run: vendor/bin/rector process -n --no-progress-bar --ansi
12+
jobs:
13+
rector_analysis:
14+
name: Rector analysis
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
2818

29-
code_analysis:
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
php-version: ['8.2', '8.3', '8.4']
34-
actions:
35-
-
36-
name: Coding Standard
37-
# tip: add "--ansi" to commands in CI to make them full of colors
38-
run: vendor/bin/ecs check src --ansi
19+
- uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: 8.4
22+
extensions: json, mbstring, pdo, curl, pdo_sqlite
23+
coverage: none
24+
tools: symfony-cli
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3927

40-
-
41-
name: PHPStan
42-
run: vendor/bin/phpstan analyse --ansi
28+
- name: Cache Composer dependencies
29+
uses: actions/cache@v4
30+
with:
31+
path: ${{ env.COMPOSER_HOME }}
32+
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
33+
- run: composer install --no-progress --no-interaction
4334

44-
-
45-
name: Check composer.json and composer.lock
46-
run: composer validate --strict --ansi
35+
- run: vendor/bin/rector process -n --no-progress-bar --ansi
36+
37+
code_analysis:
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
php-version: [ '8.2', '8.3', '8.4' ]
42+
actions:
43+
- name: Coding Standard
44+
# tip: add "--ansi" to commands in CI to make them full of colors
45+
run: vendor/bin/ecs check src --ansi
4746

48-
name: ${{ matrix.actions.name }} - PHP ${{ matrix.php-version }}
49-
runs-on: ubuntu-latest
47+
- name: PHPStan
48+
run: vendor/bin/phpstan analyse --ansi
5049

51-
steps:
52-
- uses: actions/checkout@v4
53-
# see https://github.com/shivammathur/setup-php
54-
- uses: shivammathur/setup-php@v2
55-
with:
56-
# test the lowest version, to make sure checks pass on it
57-
php-version: ${{ matrix.php-version }}
58-
extensions: json, mbstring, pdo, curl, pdo_sqlite
59-
coverage: none
60-
tools: symfony-cli
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
- name: Check composer.json and composer.lock
51+
run: composer validate --strict --ansi
52+
53+
name: ${{ matrix.actions.name }} - PHP ${{ matrix.php-version }}
54+
runs-on: ubuntu-latest
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
# see https://github.com/shivammathur/setup-php
59+
- uses: shivammathur/setup-php@v2
60+
with:
61+
# test the lowest version, to make sure checks pass on it
62+
php-version: ${{ matrix.php-version }}
63+
extensions: json, mbstring, pdo, curl, pdo_sqlite
64+
coverage: none
65+
tools: symfony-cli
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6368

64-
- run: composer install --no-progress --ansi
69+
- run: composer install --no-progress --ansi
6570

66-
- run: ${{ matrix.actions.run }}
71+
- run: ${{ matrix.actions.run }}

0 commit comments

Comments
 (0)