File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Code Quality
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - ' plugins/**'
7+
8+ jobs :
9+ run :
10+ runs-on : ubuntu-latest
11+ name : Check code quality
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Get changed plugin directory
18+ id : plugin
19+ run : |
20+ git fetch --prune --unshallow
21+ plugin=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^plugins/' | head -1 | cut -d/ -f2)
22+ echo "slug=$plugin" >> $GITHUB_OUTPUT
23+
24+ - name : Setup PHP
25+ uses : shivammathur/setup-php@v2
26+ with :
27+ php-version : ' 7.4'
28+ tools : composer:v2
29+ coverage : none
30+
31+ - name : Install dependencies
32+ uses : ramsey/composer-install@v2
33+ with :
34+ composer-options : " --no-progress"
35+
36+ - name : Run PHP CodeSniffer
37+ working-directory : plugins/${{ steps.plugin.outputs.slug }}
38+ run : composer run-script phpcs
39+
40+ - name : Run PHPStan
41+ working-directory : plugins/${{ steps.plugin.outputs.slug }}
42+ run : composer run-script phpstan
43+
44+ - name : Run Psalm
45+ working-directory : plugins/${{ steps.plugin.outputs.slug }}
46+ run : composer run-script psalm
You can’t perform that action at this time.
0 commit comments