- added GH action for checking PHPCS + WPCS

This commit is contained in:
Nikita Sinelnikov
2022-06-16 01:41:37 +03:00
parent 118f5a1706
commit 986805e064
3 changed files with 50 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
name: JobBoardWP GitHub Actions
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run CS
run: vendor/bin/phpcs --standard=phpcs.xml .
+8 -1
View File
@@ -10,7 +10,14 @@
"woocommerce/action-scheduler": "3.2.1"
},
"require-dev": {
"roave/security-advisories": "dev-master"
"roave/security-advisories": "dev-master",
"wp-cli/wp-cli": "*",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"object-calisthenics/phpcs-calisthenics-rules": "*",
"phpcompatibility/phpcompatibility-wp": "*",
"wp-coding-standards/wpcs": "2.3.0",
"squizlabs/php_codesniffer": "3.*",
"phpdocumentor/phpdocumentor": "3.1.*"
},
"extra": {
"installer-paths": {
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<ruleset name="Ultimate Member CS">
<description>Best practices Ultimate Member Coding Standards</description>
<config name="testVersion" value="5.6-"/>
<arg value="ps"/>
<arg name="colors"/>
<arg name="parallel" value="100"/>
<arg name="extensions" value="php"/>
<arg name="cache" value=".phpcs.cache"/>
<exclude-pattern>\.github/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>documentor/*</exclude-pattern>
<exclude-pattern>\.idea/*</exclude-pattern>
<rule ref="WordPress-Extra"/>
<rule ref="PHPCompatibilityWP">
<include-pattern>*\.php$</include-pattern>
</rule>
</ruleset>