Skip to content

Commit

Permalink
Update unit tests for WordPress Coding Standards 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Feb 14, 2024
1 parent a5b2f81 commit 82ac13c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @Author: Roni Laukkarinen
# @Date: 2023-02-15 17:39:37
# @Last Modified by: Roni Laukkarinen
# @Last Modified time: 2023-05-18 17:26:05
# @Last Modified time: 2024-02-14 17:02:41
name: PHP

on: [push, pull_request]
Expand All @@ -28,16 +28,21 @@ jobs:
coverage: xdebug2

- name: Set up PHPCS and WordPress-Coding-Standards
uses: php-actions/composer@v6
env:
COMPOSER: "composer.json"
with:
php_version: "7.4"
version: "2.3.7"
args: "--ignore-platform-reqs --optimize-autoloader"
run: |
git clone -b master --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR
git clone -b 2.2.1 --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $WPCS_DIR
$PHPCS_DIR/bin/phpcs --config-set installed_paths $WPCS_DIR,$PHPCOMPAT_DIR,$SNIFFS_DIR
git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $PHPCOMPAT_DIR
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --dev wp-coding-standards/wpcs:"^3.0"
composer global require --dev phpcompatibility/php-compatibility:"*"
- name: Run PHPCS
- name: Run PHP_CodeSniffer
run: |
$PHPCS_DIR/bin/phpcs -p . --ignore=node_modules,*/css/*,*/sass/* --standard=phpcs.xml
vendor/bin/phpcs -p . --extensions=php --ignore=node_modules,*/css/*,*/sass/* --standard=phpcs.xml
- name: Test PHP for syntax errors
run: find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 9.4.0rc: 2024-02-14

* Update unit tests for WordPress Coding Standards 3.0.1
* Prepare for PHP version 8.3

### 9.3.6: 2024-01-10

* Fix the permission issue with self-updater
Expand Down

0 comments on commit 82ac13c

Please sign in to comment.