diff --git a/.github/workflows/cs.yml b/.github/workflows/cs.yml index 080f6963..580c33a9 100644 --- a/.github/workflows/cs.yml +++ b/.github/workflows/cs.yml @@ -24,6 +24,9 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + - name: Run custom composer script + run: ./run-composer.sh + - name: Install PHP uses: shivammathur/setup-php@v2 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 96d7fd9e..ac3aec41 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,6 +7,7 @@ on: - master - develop - trunk + - 'feature/**' - 'release/**' - 'hotfix/[0-9]+.[0-9]+*' pull_request: @@ -35,6 +36,9 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + - name: Run custom composer script + run: ./run-composer.sh + - name: Install PHP uses: shivammathur/setup-php@v2 with: diff --git a/composer.json b/composer.json index fa5b0de4..626ca848 100644 --- a/composer.json +++ b/composer.json @@ -2,16 +2,16 @@ "name": "equalizedigital/accesibility-checker", "description": "Audit and check your website for accessibility before you hit publish. In-post accessibility scanner and guidance.", "keywords": [ - "accessibility", - "accessible", - "wcag" - ], + "accessibility", + "accessible", + "wcag" + ], "homepage": "https://equalizedigital.com/accessibility-checker/", - "license": "GPL-3.0-or-later", + "license": "GPL-3.0-or-later", "authors": [ { "name": "Equalize Digital", - "homepage": "https://equalizedigital.com" + "homepage": "https://equalizedigital.com" } ], "type": "wordpress-plugin", @@ -36,33 +36,33 @@ "require-dev": { "automattic/vipwpcs": "^3", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", - "equalizedigital/accessibility-checker-wp-env": "1.0.0", "phpcompatibility/php-compatibility": "*", - "yoast/wp-test-utils": "^1.1.1", - "php-parallel-lint/php-parallel-lint": "^1.3" + "yoast/wp-test-utils": "^1.1.1", + "php-parallel-lint/php-parallel-lint": "^1.3", + "equalizedigital/accessibility-checker-wp-env": "1.0.0" }, "require": { "cbschuld/browser.php": "^1.9", "davechild/textstatistics": "1.0.2", "php": ">=7.4", - "composer/installers": "^1.12.0" + "composer/installers": "^1.12.0" }, "scripts": { - "lint": [ - "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude node_modules --exclude .git" - ], - "config-yoastcs" : [ - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run", - "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --config-set default_standard Yoast" - ], - "check-cs": [ - "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.4-" - ], - "fix-cs": [ - "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf" - ], - "test": [ - "@php ./vendor/phpunit/phpunit/phpunit" - ] - } -} + "lint": [ + "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude node_modules --exclude .git" + ], + "config-yoastcs": [ + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run", + "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --config-set default_standard Yoast" + ], + "check-cs": [ + "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.4-" + ], + "fix-cs": [ + "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf" + ], + "test": [ + "@php ./vendor/phpunit/phpunit/phpunit" + ] + } +} \ No newline at end of file diff --git a/run-composer.sh b/run-composer.sh new file mode 100755 index 00000000..2f953c09 --- /dev/null +++ b/run-composer.sh @@ -0,0 +1,3 @@ +#!/bin/bash +php update-composer-config.php +composer install \ No newline at end of file diff --git a/update-composer-config.php b/update-composer-config.php new file mode 100644 index 00000000..1c16005b --- /dev/null +++ b/update-composer-config.php @@ -0,0 +1,25 @@ +