Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6ab743b
Update packages
ahegyes Nov 9, 2026
0bdf539
Indent JSON and NEON with tabs, as configs' .editorconfig asks
ahegyes Nov 9, 2026
7b90b18
Run the framework's inline scripts in a browser
ahegyes Nov 9, 2026
94a5542
Run Plugin Check's own sniffs over the packages
ahegyes Nov 9, 2026
7932122
Clear the packages of Plugin Check's own findings
ahegyes Nov 9, 2026
06bf506
Cancel superseded pull-request runs and check every .github change
ahegyes Nov 9, 2026
9a1c524
Retry the WordPress version lookup and keep a patch-level floor's branch
ahegyes Nov 9, 2026
2bcfcf3
Grant Quality's permissions job by job
ahegyes Nov 9, 2026
7bf5629
Split the current trunk on every branch run, in the split environment
ahegyes Nov 9, 2026
eedeac8
Audit locally with the CI gate's flags
ahegyes Nov 9, 2026
571c4e4
Keep the fixture locks current through Dependabot
ahegyes Nov 9, 2026
2fd5dee
Run the nightly lanes on PHP 8.6 and WooCommerce's trunk build
ahegyes Nov 9, 2026
e0780a7
Ignore wp-env override files and restore the toptal block
ahegyes Nov 9, 2026
8fccba4
Order the woocommerce manifest's extra keys as its siblings do
ahegyes Nov 9, 2026
4f05e02
State one reason per comment in the bootstrap profiles and the split
ahegyes Nov 9, 2026
e394364
Lay out every manifest in the template's key order
ahegyes Nov 9, 2026
a9dafcd
Build each fixture through one script, after the setup wrappers
ahegyes Nov 9, 2026
d6f1c4f
Answer WordPress.org's update checks inside admin request processes
ahegyes Nov 9, 2026
ca007ed
Drop the nightly PHP 8.6 legs before PHP 8.6 ships
ahegyes Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4

[*.{yml,yaml,json}]
[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.txt]
end_of_line = crlf
9 changes: 8 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
version: 2
updates:
- package-ecosystem: composer
directory: /
directories:
- /
- /tests/Fixtures/consumer-a
- /tests/Fixtures/consumer-b
- /tests/Fixtures/personas/*
# configs moves only together with its 14 workflow refs and npm pin, which Dependabot cannot move.
ignore:
- dependency-name: ahegyes/wordpress-configs
schedule:
interval: weekly
day: monday
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
schedule:
- cron: '0 7 * * 1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
audit:
name: Audit
# Dev-dependency advisories surface through Dependabot alerts instead of failing this gate.
uses: ahegyes/wordpress-configs/.github/workflows/reusable-supply-chain-audit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
with:
npm-audit-flags: '--omit=dev --audit-level=high'
# npm's dev-dependency advisories surface through Dependabot alerts instead of failing this gate.
uses: ahegyes/wordpress-configs/.github/workflows/reusable-supply-chain-audit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
actions: read
contents: read
security-events: write
uses: ahegyes/wordpress-configs/.github/workflows/reusable-codeql.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-codeql.yml@c944e73ab2656633397e7736ea104bbe72726ffd
29 changes: 22 additions & 7 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,34 @@ on:
branches: [trunk]
pull_request:

permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions: {}

jobs:
lint-php:
name: Lint PHP
uses: ahegyes/wordpress-configs/.github/workflows/reusable-php-lint.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
permissions:
contents: read
uses: ahegyes/wordpress-configs/.github/workflows/reusable-php-lint.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
scripts: '["lint:php:phpcs", "lint:php:phpcs:tests", "lint:php:phpstan", "changelog:validate"]'

lint-scripts:
name: Lint scripts
permissions:
contents: read
uses: ahegyes/wordpress-configs/.github/workflows/reusable-scripts-styles-lint.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
scripts: '["lint:scripts"]'

php-syntax:
name: PHP syntax
uses: ahegyes/wordpress-configs/.github/workflows/reusable-php-syntax-check.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
name: PHP 7.4 syntax (bootstrap)
permissions:
contents: read
uses: ahegyes/wordpress-configs/.github/workflows/reusable-php-syntax-check.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-versions: '["7.4"]'
paths: '["packages/bootstrap"]'
Expand Down Expand Up @@ -61,7 +76,7 @@ jobs:
needs: consumer-a-build
permissions:
contents: read
uses: ahegyes/wordpress-configs/.github/workflows/reusable-plugin-check.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-plugin-check.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
artifact: consumer-a
plugin-slug: acme-consumer-a
Expand All @@ -73,7 +88,7 @@ jobs:
needs: consumer-a-build
permissions:
contents: read
uses: ahegyes/wordpress-configs/.github/workflows/reusable-php-syntax-check.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-php-syntax-check.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
artifact: consumer-a
php-versions: '["7.4"]'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/split-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
permissions:
contents: read

# Splits of one ref run in order, so an older run never force-pushes over a newer split.
# Splits of one ref never run at once, and a newer pending run replaces an older one.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
Expand All @@ -22,6 +22,8 @@ jobs:
# A dispatch from another branch would force-push that branch's split over the mirrors' trunk.
if: github.ref == 'refs/heads/trunk' || startsWith( github.ref, 'refs/tags/v' )
runs-on: ubuntu-latest
timeout-minutes: 10
environment: split
strategy:
fail-fast: false
matrix:
Expand All @@ -34,6 +36,8 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# A branch run, a re-run included, splits the current trunk, so re-running an older run never rewinds the mirrors; a tag run splits its tagged commit.
ref: ${{ github.ref_type == 'tag' && github.sha || 'trunk' }}
fetch-depth: 0
# The default credential helper would hijack the PAT-in-URL push auth and fail with 403.
persist-credentials: false
Expand All @@ -42,7 +46,7 @@ jobs:
run: |
# v1.0.1 is the latest splitsh-lite release with a published linux/amd64 binary (v2.0.0 was tagged with no assets).
curl -fsSL -o splitsh.tar.gz https://github.com/splitsh/lite/releases/download/v1.0.1/lite_linux_amd64.tar.gz
# sha256 computed from the v1.0.1 release asset (upstream publishes no checksums — trust-on-first-use pin).
# Upstream publishes no checksums, so this hash pins the v1.0.1 asset on first use.
echo "2539301ce5e21d0ca44b689d0dd2c1b20d9f9e996c1fe6c462afb8af4e7141cc splitsh.tar.gz" | sha256sum -c -
tar -xzf splitsh.tar.gz
sudo mv splitsh-lite /usr/local/bin/
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/tests-nightly.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Tests (nightly)

# WordPress trunk changes daily without a commit here, so this runs on a schedule instead of blocking pull requests.
# WordPress trunk and WooCommerce's trunk build change daily without a commit here, so this runs on a schedule instead of blocking pull requests.
on:
schedule:
- cron: '0 5 * * *'
Expand All @@ -12,7 +12,7 @@ permissions:
jobs:
integration:
name: Integration
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
wp-env-core: 'https://wordpress.org/nightly-builds/wordpress-latest.zip'
Expand All @@ -21,9 +21,17 @@ jobs:

integration-multisite:
name: Integration (multisite)
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
wp-env-core: 'https://wordpress.org/nightly-builds/wordpress-latest.zip'
composer-script: 'test:integration:multisite:run'
wp-env-config-file: '.wp-env.multisite.json'

integration-woocommerce-nightly:
name: Integration (WooCommerce nightly)
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
composer-script: 'test:integration:woocommerce-nightly:run'
wp-env-config-file: '.wp-env.woocommerce-nightly.json'
35 changes: 27 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
unit:
name: Unit
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
composer-script: 'test:unit'
Expand All @@ -35,9 +39,9 @@ jobs:
- name: List the newest release of every branch from the floor up
id: versions
run: |
floor=$(jq -rs '[.[].extra["requires-wp"] // empty] | max_by(split(".") | map(tonumber)) // error("No package declares extra.requires-wp.")' packages/*/composer.json)
offers=$(curl -fsS https://api.wordpress.org/core/version-check/1.7/)
versions=$(printf '%s' "$offers" | jq -c --arg floor "$floor" '[.offers[].version | select((split(".")[0:2] | map(tonumber)) >= ($floor | split(".") | map(tonumber)))] | unique | if length == 0 then error("No WordPress release at or above \($floor).") else . end')
floor=$(jq -rs 'def v: split(".") | map(tonumber) | . + [0, 0] | .[0:3]; [.[].extra["requires-wp"] // empty] | max_by(v) // error("No package declares extra.requires-wp.")' packages/*/composer.json)
offers=$(curl -fsS --retry 3 --retry-all-errors --max-time 20 https://api.wordpress.org/core/version-check/1.7/)
versions=$(printf '%s' "$offers" | jq -c --arg floor "$floor" 'def v: split(".") | map(tonumber) | . + [0, 0] | .[0:3]; [.offers[].version | select(v >= ($floor | v))] | unique | if length == 0 then error("No WordPress release at or above \($floor).") else . end')
echo "versions=$versions" >> "$GITHUB_OUTPUT"

integration:
Expand All @@ -47,7 +51,7 @@ jobs:
fail-fast: false
matrix:
wp: ${{ fromJSON(needs.wordpress.outputs.versions) }}
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
wp-version: ${{ matrix.wp }}
Expand All @@ -61,24 +65,39 @@ jobs:
fail-fast: false
matrix:
wp: ${{ fromJSON(needs.wordpress.outputs.versions) }}
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
wp-version: ${{ matrix.wp }}
composer-script: 'test:integration:multisite:run'
wp-env-config-file: '.wp-env.multisite.json'

e2e:
name: E2E
needs: wordpress
strategy:
fail-fast: false
matrix:
wp: ${{ fromJSON(needs.wordpress.outputs.versions) }}
uses: ahegyes/wordpress-configs/.github/workflows/reusable-playwright-e2e.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
artifact-slug: wp-${{ matrix.wp }}
php-version: '8.5'
wp-version: ${{ matrix.wp }}
build-script: ''
wp-env-config-file: '.wp-env.tests.json'

integration-php74:
name: Integration (PHP 7.4)
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
composer-script: 'test:integration:php74:run'
wp-env-config-file: '.wp-env.php74.json'

prefer-lowest:
name: Prefer lowest
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-phpunit.yml@c944e73ab2656633397e7736ea104bbe72726ffd
with:
php-version: '8.5'
composer-script: 'test:integration:lowest:run'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/workflow-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Workflow Checks
on:
push:
branches: [trunk]
paths: ['.github/workflows/**']
paths: ['.github/**']
pull_request:
paths: ['.github/workflows/**']
paths: ['.github/**']
schedule:
# Re-runs zizmor's online audits between workflow changes.
- cron: '0 6 * * 1'
Expand All @@ -24,4 +24,4 @@ jobs:
contents: read
security-events: write
actions: read
uses: ahegyes/wordpress-configs/.github/workflows/reusable-workflow-checks.yml@3cbd985255e76f8026644ccdee5be0b2b2da312b
uses: ahegyes/wordpress-configs/.github/workflows/reusable-workflow-checks.yml@c944e73ab2656633397e7736ea104bbe72726ffd
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.wp-env*.override.json
tests/.cache
tests/Fixtures/consumer-a/vendor/
tests/Fixtures/consumer-a/vendor-prefixed/
Expand Down Expand Up @@ -39,8 +40,7 @@ composer.phar
.LSOverride

# Icon must end with two \r
Icon

Icon

# Thumbnails
._*
Expand Down
34 changes: 17 additions & 17 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.schema.json",
"core": "WordPress/WordPress#tags/7.1.3",
"phpVersion": "8.5",
"port": 8800,
"testsEnvironment": false,
"mappings": {
"wp-content/mu-plugins/wp-framework": ".",
"wp-content/plugins/woocommerce": "./vendor/wp-plugin/woocommerce"
},
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true,
"WP_ENVIRONMENT_TYPE": "local"
},
"lifecycleScripts": {
"afterStart": "node_modules/.bin/wp-env run cli wp plugin activate woocommerce && node_modules/.bin/wp-env run cli wp wc hpos enable"
}
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"core": "WordPress/WordPress#tags/7.1.4",
"phpVersion": "8.5",
"port": 8800,
"testsEnvironment": false,
"mappings": {
"wp-content/mu-plugins/wp-framework": ".",
"wp-content/plugins/woocommerce": "./vendor/wp-plugin/woocommerce"
},
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true,
"WP_ENVIRONMENT_TYPE": "local"
},
"lifecycleScripts": {
"afterStart": "node_modules/.bin/wp-env run cli wp plugin activate woocommerce && node_modules/.bin/wp-env run cli wp wc hpos enable"
}
}
28 changes: 14 additions & 14 deletions .wp-env.multisite.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.schema.json",
"core": "WordPress/WordPress#tags/7.1.3",
"phpVersion": "8.5",
"port": 8802,
"testsEnvironment": false,
"multisite": true,
"mappings": {
"wp-content/mu-plugins/wp-framework": "."
},
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true,
"WP_ENVIRONMENT_TYPE": false
}
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"core": "WordPress/WordPress#tags/7.1.4",
"phpVersion": "8.5",
"port": 8802,
"testsEnvironment": false,
"multisite": true,
"mappings": {
"wp-content/mu-plugins/wp-framework": "."
},
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true,
"WP_ENVIRONMENT_TYPE": false
}
}
Loading
Loading