mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
fix(check-extension): probe vendor dir for MageOS/Magento standards when running phpcs (#216)
Closes #213
This commit is contained in:
@@ -182,7 +182,18 @@ jobs:
|
|||||||
- name: Register Coding Standard
|
- name: Register Coding Standard
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ inputs.path }}
|
working-directory: ${{ inputs.path }}
|
||||||
run: vendor/bin/phpcs --config-set installed_paths vendor/magento/magento-coding-standard,vendor/magento/php-compatibility-fork
|
run: |
|
||||||
|
if [ -d vendor/magento/magento-coding-standard ]; then
|
||||||
|
CODING_STANDARD_VENDOR=magento
|
||||||
|
elif [ -d vendor/mage-os/magento-coding-standard ]; then
|
||||||
|
CODING_STANDARD_VENDOR=mage-os
|
||||||
|
else
|
||||||
|
echo "No magento-coding-standard directory found under vendor/magento or vendor/mage-os."
|
||||||
|
echo "Trusting dealerdirect/phpcodesniffer-composer-installer to have registered installed_paths."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
vendor/bin/phpcs --config-set installed_paths \
|
||||||
|
"vendor/${CODING_STANDARD_VENDOR}/magento-coding-standard,vendor/${CODING_STANDARD_VENDOR}/php-compatibility-fork"
|
||||||
|
|
||||||
- name: Coding Standard Check
|
- name: Coding Standard Check
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
Reference in New Issue
Block a user