File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 2626 plugin=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^plugins/' | head -1 | cut -d/ -f2)
2727 echo "slug=$plugin" >> $GITHUB_OUTPUT
2828
29+ # We should at least have a phpcs.xml file to run code quality checks
30+ - name : Validate phpcs.xml
31+ run : |
32+ if [ ! -f "plugins/${{ steps.plugin.outputs.slug }}/phpcs.xml" ]; then
33+ echo "Exiting as no phpcs.xml file found for /${{ steps.plugin.outputs.slug }}"
34+ exit 1
35+ fi
36+
2937 - name : PHP Code Quality
3038 uses : ./.github/actions/code-quality
3139 with :
Original file line number Diff line number Diff line change @@ -43,10 +43,18 @@ jobs:
4343 plugin=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^plugins/' | head -1 | cut -d/ -f2)
4444 echo "slug=$plugin" >> $GITHUB_OUTPUT
4545
46+ - name : Validate codeception.dist.yml
47+ run : |
48+ if [ ! -f "plugins/${{ steps.plugin.outputs.slug }}/codeception.dist.yml" ]; then
49+ echo "Exiting as no codeception file found for this plugin - /${{ steps.plugin.outputs.slug }}"
50+ exit 1
51+ fi
52+
4653 - name : Validate composer.json
4754 run : |
4855 if [ ! -f "plugins/${{ steps.plugin.outputs.slug }}/composer.json" ]; then
49- echo "Warning: composer.json missing in plugins/${{ steps.plugin.outputs.slug }}"
56+ echo "Exiting as no composer file found for this plugin - ${{ steps.plugin.outputs.slug }}"
57+ exit 1
5058 fi
5159
5260 - name : Run Codeception Tests
You can’t perform that action at this time.
0 commit comments