This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Server-side rendering of those directives via `WP_HTML_Tag_Processor`. Gutenberg 15.0 is the first version to include [`get_attribute_names_with_prefix()`](WordPress/gutenberg#46840). This means that we now have everything we need to implement `wp-bind`, `wp-class`, and `wp-style`. This PR thus adds those directives, plus `wp-context`. This also adds PHP unit test infrastructure and CI, in order to allow us to adopt a test-driven development approach for individual directives. Those "infrastructure" files are mostly copied directly from GB, with some minor modifications. Refer to individual commit messages on the PR to learn more.
- Loading branch information
Showing
18 changed files
with
1,023 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'main*' | ||
|
||
# Cancels all previous workflow runs for pull requests that have not completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name for pull requests | ||
# or the commit hash for any other events. | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
unit-php: | ||
name: PHP | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository == 'WordPress/block-hydration-experiments' || github.event_name == 'pull_request' }} | ||
|
||
steps: | ||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 | ||
|
||
- name: Install Composer dependencies | ||
run: | | ||
composer install | ||
- name: Use desired version of NodeJS | ||
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 | ||
with: | ||
node-version: 14 | ||
cache: npm | ||
|
||
- name: Npm install and build | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Run WordPress | ||
run: | | ||
npm run wp-env start | ||
- name: Running single site unit tests | ||
run: npm run test:unit:php | ||
if: ${{ success() || failure() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.