1313 - ' README.md'
1414
1515jobs :
16+ static-analysis :
17+ name : Static Code Analysis
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v2
22+
23+ - name : Install PHP with extensions
24+ uses : shivammathur/setup-php@v2
25+ with :
26+ php-version : ${{ matrix.php }}
27+ tools : ' composer:v2, flex'
28+
29+ - name : Install Package Deps
30+ uses : ramsey/composer-install@v2
31+ with :
32+ dependency-versions : stable
33+ composer-options : --prefer-dist
34+
35+ - name : Install Psalm
36+ uses : ramsey/composer-install@v2
37+ with :
38+ composer-options : --prefer-dist
39+ working-directory : tools/psalm
40+
41+ - name : Psalm
42+ run : tools/psalm/vendor/bin/psalm --report=psalm-report.sarif
43+
44+ - run : |
45+ wget https://github.com/zolex/go-sarif-to-markdown-table/raw/refs/heads/main/bin/sarif-to-markdown-table-linux-amd64
46+ chmod +x ./sarif-to-markdown-table-linux-amd64
47+ cat psalm-report.sarif | ./sarif-to-markdown-table-linux-amd64 > psalm-report.markdown
48+
49+ - uses : mshick/add-pr-comment@v2
50+ with :
51+ message-path : ./psalm-report.markdown
52+ message-id : psalm
53+
54+
55+ codestyle :
56+ name : Code Style
57+ runs-on : ubuntu-latest
58+ steps :
59+ - name : Checkout code
60+ uses : actions/checkout@v2
61+
62+ - name : Install PHP with extensions
63+ uses : shivammathur/setup-php@v2
64+ with :
65+ coverage : xdebug
66+ php-version : ${{ matrix.php }}
67+ tools : ' composer:v2, flex'
68+
69+ - name : Install Package Deps
70+ uses : ramsey/composer-install@v2
71+ with :
72+ dependency-versions : stable
73+ composer-options : --prefer-dist
74+
75+ - name : Install PHP-CS-Fixer
76+ uses : ramsey/composer-install@v2
77+ with :
78+ dependency-versions : stable
79+ composer-options : --prefer-dist
80+ working-directory : tools/php-cs-fixer
81+
82+ - name : PHP-CS-Fixer
83+ run : PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run --show-progress=dots --ansi --verbose
84+
1685 tests :
1786 name : Test ${{ matrix.php }}, symfony=${{ matrix.symfony }}, deps=${{ matrix.deps }}
1887 runs-on : ubuntu-latest
88+ needs : [ codestyle, static-analysis ]
1989 env :
2090 SYMFONY_DEPRECATIONS_HELPER : ' max[self]=0'
2191 strategy :
@@ -72,10 +142,10 @@ jobs:
72142 - name : Run tests
73143 run : tools/phpunit/vendor/bin/phpunit --colors=always --testdox
74144
75- cs :
76- name : Code Style & Coverage
145+ coverage :
146+ name : Coverage Report
77147 runs-on : ubuntu-latest
78- needs : [ tests ]
148+ needs : [ codestyle, static-analysis, tests ]
79149 steps :
80150 - name : Checkout code
81151 uses : actions/checkout@v2
@@ -99,16 +169,6 @@ jobs:
99169 composer-options : --prefer-dist
100170 working-directory : tools/phpunit
101171
102- - name : Install PHP-CS-Fixer
103- uses : ramsey/composer-install@v2
104- with :
105- dependency-versions : stable
106- composer-options : --prefer-dist
107- working-directory : tools/php-cs-fixer
108-
109- - name : PHP-CS-Fixer
110- run : PHP_CS_FIXER_IGNORE_ENV=1 tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --dry-run --show-progress=dots --ansi --verbose
111-
112172 - name : Create Coverage Report
113173 run : tools/phpunit/vendor/bin/phpunit --colors=always --coverage-text --coverage-clover=./clover.xml
114174
0 commit comments