Skip to content

Commit 795ef32

Browse files
authored
Workflows
1 parent c34fcf2 commit 795ef32

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/php-code-quality.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ jobs:
104104
105105
# Run the actual compatibility check
106106
if ! vendor/bin/phpcs --standard=phpcs.xml --extensions=php --ignore=vendor/,node_modules/ .; then
107-
echo "Error: The phpcs.xml standard may have issues with PHPCompatibility reference."
108-
echo "Trying with direct PHPCompatibility standard..."
109-
cp phpcs.xml phpcs.xml.bak
110-
cat > phpcs-compat.xml << 'EOF'
107+
echo "Error: The phpcs.xml standard may have issues with PHPCompatibility reference."
108+
echo "Trying with direct PHPCompatibility standard..."
109+
cp phpcs.xml phpcs.xml.bak
110+
cat > phpcs-compat.xml << 'EOF'
111111
<?xml version="1.0"?>
112112
<ruleset name="PHP Compatibility Check">
113113
<description>Check PHP compatibility for WordPress plugin</description>
@@ -120,9 +120,9 @@ cat > phpcs-compat.xml << 'EOF'
120120
<exclude-pattern>/node_modules/*</exclude-pattern>
121121
</ruleset>
122122
EOF
123-
vendor/bin/phpcs --config-set installed_paths ${ABSOLUTE_PHPCOMP_PATH},${ABSOLUTE_WPCS_PATH}
124-
vendor/bin/phpcs --standard=phpcs-compat.xml --extensions=php --ignore=vendor/,node_modules/ .
125-
fi
123+
vendor/bin/phpcs --config-set installed_paths ${ABSOLUTE_PHPCOMP_PATH},${ABSOLUTE_WPCS_PATH}
124+
vendor/bin/phpcs --standard=phpcs-compat.xml --extensions=php --ignore=vendor/,node_modules/ .
125+
fi
126126

127127
- name: Fix text argument escaping issues
128128
run: |

.github/workflows/wordpress-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ jobs:
279279
else
280280
echo "::warning::Files may be missing in /wordpress-tests-lib, creating core files if needed"
281281
sudo mkdir -p /wordpress-tests-lib/includes/
282-
sudo cp -f /tmp/wordpress-tests-lib/includes/functions.php /wordpress-tests-lib/includes/ || echo "::warning::Failed to copy functions.php"
283-
sudo cp -f /tmp/wordpress-tests-lib/wp-tests-config.php /wordpress-tests-lib/ || echo "::warning::Failed to copy wp-tests-config.php"
282+
if ! sudo cp -f /tmp/wordpress-tests-lib/includes/functions.php /wordpress-tests-lib/includes/; then echo "::warning::Failed to copy functions.php"; fi
283+
if ! sudo cp -f /tmp/wordpress-tests-lib/wp-tests-config.php /wordpress-tests-lib/; then echo "::warning::Failed to copy wp-tests-config.php"; fi
284284
fi
285285
286286
# Create or copy required class-basic-object.php file if missing

0 commit comments

Comments
 (0)