mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
Merge pull request #162 from Tjitse-E/fix-baseline-composer-conflicts
fix: PHPcs baseline composer conflicts
This commit is contained in:
@@ -91,21 +91,21 @@ runs:
|
|||||||
tools: composer:v${{ inputs.composer_version }}
|
tools: composer:v${{ inputs.composer_version }}
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
- name: Install Coding Standard && Codesniffer baseline
|
- name: Create composer project
|
||||||
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git config --global advice.detachedHead false
|
composer create-project --no-plugins --no-dev \
|
||||||
composer require "magento/magento-coding-standard: ${{ github.event.inputs.version || '*' }}" -W
|
magento/magento-coding-standard \
|
||||||
composer config --no-plugins allow-plugins.digitalrevolution/php-codesniffer-baseline true
|
magento-coding-standard "${{ github.event.inputs.version || '*' }}"
|
||||||
composer require --dev "digitalrevolution/php-codesniffer-baseline: ${{ github.event.inputs.baseline_version || '*' }}"
|
|
||||||
|
|
||||||
- name: Register coding standards
|
- name: Register coding standards
|
||||||
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
||||||
|
working-directory: magento-coding-standard
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
${{ github.workspace }}/vendor/bin/phpcs --config-set installed_paths \
|
composer config --no-plugins allow-plugins.digitalrevolution/php-codesniffer-baseline true
|
||||||
${{ github.workspace }}/vendor/magento/magento-coding-standard,${{ github.workspace }}/vendor/phpcompatibility/php-compatibility
|
composer require --dev "digitalrevolution/php-codesniffer-baseline: ${{ github.event.inputs.baseline_version || '*' }}"
|
||||||
|
|
||||||
- name: Checkout base to generate baseline
|
- name: Checkout base to generate baseline
|
||||||
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
||||||
@@ -120,7 +120,7 @@ runs:
|
|||||||
working-directory: base
|
working-directory: base
|
||||||
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
php ${{ github.workspace }}/vendor/bin/phpcs --standard=Magento2 \
|
php ${{ github.workspace }}/magento-coding-standard/vendor/bin/phpcs --standard=Magento2 \
|
||||||
$([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
|
$([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
|
||||||
$([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
|
$([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
|
||||||
$([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
|
$([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
|
||||||
@@ -145,7 +145,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
if: steps.changed-files-phpcs.outputs.app_any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
php ${{ github.workspace }}/vendor/bin/phpcs --standard=Magento2 \
|
php ${{ github.workspace }}/magento-coding-standard/vendor/bin/phpcs --standard=Magento2 \
|
||||||
$([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
|
$([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
|
||||||
$([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
|
$([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
|
||||||
$([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
|
$([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
|
||||||
|
|||||||
Reference in New Issue
Block a user