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
c327fbb
fix: declare lint-js-fix as phony
dcalhoun Sep 19, 2026
472242b
docs: document the Makefile target naming grammar
dcalhoun Sep 19, 2026
d31d24d
docs: correct and clarify Makefile help descriptions
dcalhoun Sep 19, 2026
53fb0c4
refactor: rename Makefile targets that broke the naming grammar
dcalhoun Sep 19, 2026
948a3c8
refactor: mark the elided scope in test target names
dcalhoun Sep 19, 2026
31a988b
docs: state the verb and namespace rules in the naming grammar
dcalhoun Sep 19, 2026
20f74c9
refactor: give wp-env-android-urls a verb
dcalhoun Sep 19, 2026
3d5f88b
refactor: rename prep-translations to fetch-translations
dcalhoun Sep 19, 2026
7544eb9
ci: keep step labels and keys unchanged in this PR
dcalhoun Sep 21, 2026
f1c683f
refactor: say "E2E" in the Android library E2E target's output
dcalhoun Sep 21, 2026
81a433f
fix: stop preview from rebuilding into the native projects
dcalhoun Sep 22, 2026
7fff864
refactor: derive direct-invocation checks from the target name
dcalhoun Sep 22, 2026
0359b45
refactor: reuse copy-android-dist in the Android test targets
dcalhoun Sep 22, 2026
8c3b923
docs: correct stale translation, E2E, and wp-env-clean text
dcalhoun Sep 22, 2026
0364568
docs: lead target names with the platform in the naming grammar
dcalhoun Sep 22, 2026
a6e506c
refactor: name lint, test, and build targets by platform
dcalhoun Sep 22, 2026
cb699dc
refactor: mark the Android library unit test target's kind
dcalhoun Sep 22, 2026
11a2410
refactor: name the npm install targets for the web editor
dcalhoun Sep 22, 2026
f0866db
refactor: give the dev server, preview, and DevTools targets verbs
dcalhoun Sep 22, 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
42 changes: 21 additions & 21 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ steps:
key: build-react
command: |
# Fail fast if any step (including the backgrounded
# `prep-translations`, surfaced via `wait`) returns non-zero,
# `fetch-translations`, surfaced via `wait`) returns non-zero,
# rather than continuing into `make build` with partial inputs.
set -euo pipefail
# `prep-translations` is pure network I/O and no longer depends
# `fetch-translations` is pure network I/O and no longer depends
# on `node_modules` (uses Node's built-in `fetch`), so it can run
# in parallel with `npm ci`. Vite reads `src/translations/` when
# it emits locale bundles, so we wait for the fetch to complete
Expand All @@ -27,16 +27,16 @@ steps:
# interleave with `npm ci`'s and confuse Buildkite log folding.
# The replay happens unconditionally so a failed fetch surfaces
# its log before `set -e` aborts the script.
make prep-translations STRICT_L10N=1 > prep-translations.log 2>&1 &
PREP_PID=$$!
make npm-dependencies
PREP_STATUS=0
wait $$PREP_PID || PREP_STATUS=$$?
echo "--- :earth_americas: prep-translations (ran in parallel with npm ci)"
cat prep-translations.log
rm -f prep-translations.log
if [ "$$PREP_STATUS" -ne 0 ]; then
exit "$$PREP_STATUS"
make fetch-translations STRICT_L10N=1 > fetch-translations.log 2>&1 &
FETCH_PID=$$!
make install-web-deps
FETCH_STATUS=0
wait $$FETCH_PID || FETCH_STATUS=$$?
echo "--- :earth_americas: fetch-translations (ran in parallel with npm ci)"
cat fetch-translations.log
rm -f fetch-translations.log
if [ "$$FETCH_STATUS" -ne 0 ]; then
exit "$$FETCH_STATUS"
fi
make build REFRESH_JS_BUILD=1
tar -czf dist.tar.gz dist/
Expand All @@ -55,7 +55,7 @@ steps:

- label: ':eslint: Lint React App'
key: lint-js
command: make lint-js
command: make lint-web
plugins: *plugins

- label: ':npm: Check @wordpress package versions'
Expand All @@ -65,7 +65,7 @@ steps:

- label: ':javascript: Test JavaScript'
key: test-js
command: make test-js
command: make test-web-unit
plugins: *plugins

- label: ':performing_arts: Test Web E2E'
Expand All @@ -77,7 +77,7 @@ steps:
echo "--- :wordpress: Starting wp-env"
make wp-env-start
echo "--- :performing_arts: Running E2E tests"
make test-e2e
make test-web-e2e
plugins: *plugins

- label: ':android: Publish Android Library'
Expand Down Expand Up @@ -110,7 +110,7 @@ steps:
command: |
buildkite-agent artifact download dist.tar.gz .
tar -xzf dist.tar.gz
make test-android
make test-android-library-unit
agents:
queue: android
plugins: *plugins
Expand All @@ -121,7 +121,7 @@ steps:
command: |
buildkite-agent artifact download dist.tar.gz .
tar -xzf dist.tar.gz
make test-swift-package
make test-ios-library-simulator
plugins: *plugins

- label: ':swift: Library Tests'
Expand All @@ -130,7 +130,7 @@ steps:
command: |
buildkite-agent artifact download dist.tar.gz .
tar -xzf dist.tar.gz
make test-swift-library
make test-ios-library-host
plugins: *plugins

- label: ':xcode: Build XCFramework'
Expand All @@ -143,7 +143,7 @@ steps:
tar -xzf dist.tar.gz
install_gems
bundle exec fastlane set_up_signing_release
make build-resources-xcframework
make build-ios-resources-xcframework
bundle exec fastlane xcframework_sign
./package_xcframework.sh
artifact_paths:
Expand Down Expand Up @@ -199,7 +199,7 @@ steps:
command: |
buildkite-agent artifact download dist.tar.gz .
tar -xzf dist.tar.gz
make test-ios-e2e
make test-ios-app-e2e
plugins: *plugins

- label: ':android: Test Android E2E'
Expand All @@ -212,7 +212,7 @@ steps:
--system-image "system-images;android-34;google_apis;arm64-v8a" \
--device "pixel_5"
echo "--- :android: Running Android instrumented tests"
make test-android-e2e
make test-android-app-e2e
agents:
queue: mac-metal
plugins: *plugins
Expand Down
14 changes: 8 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ To see all available make commands with descriptions, run:
make help
```

New targets follow the naming grammar documented in the header comment at the top of the `Makefile`.

By default, dependencies, translations, and JS build are skipped if output directories already exist. Environment variables be used to force refresh of these steps when needed.

- `REFRESH_DEPS=1` - Force refresh of dependencies (e.g. re-install npm packages)
Expand Down Expand Up @@ -71,10 +73,10 @@ Note: Console logs should be used sparingly. For verbose or development-specific

```bash
# Auto-fix linting errors & verify linting passes
make lint-js-fix
make lint-web-fix

# When Swift files changed
make lint-swift-fix
make lint-ios-fix
```

These commands ensure code quality and prevent lint errors from blocking commits.
Expand All @@ -85,8 +87,8 @@ Swift code is linted with SwiftLint, run via the SwiftPM plugin in the `BuildToo
package so the linter stays out of the dependency graph of anyone consuming
GutenbergKit via SwiftPM.

- `make lint-swift` — report violations
- `make lint-swift-fix` — auto-correct the violations SwiftLint can fix
- `make lint-ios` — report violations
- `make lint-ios-fix` — auto-correct the violations SwiftLint can fix

The SwiftLint version is pinned in a single place: the `swiftlint_version` key in
`.swiftlint.yml`. `BuildTools/Package.swift` parses that key at manifest-evaluation
Expand All @@ -102,14 +104,14 @@ stay consistent for the shared team.
To lint specific files rather than the whole project, set `SWIFT_LINT_PATHS`:

```bash
make lint-swift SWIFT_LINT_PATHS=ios/Sources/GutenbergKit/Sources/EditorService.swift
make lint-ios SWIFT_LINT_PATHS=ios/Sources/GutenbergKit/Sources/EditorService.swift
```

Separate multiple files with **newlines**, not spaces, so that paths containing
spaces stay intact. This makes it easy to lint just the changed files:

```bash
make lint-swift SWIFT_LINT_PATHS="$(git diff --name-only -- '*.swift')"
make lint-ios SWIFT_LINT_PATHS="$(git diff --name-only -- '*.swift')"
```

Each value must be a path to an existing **file**. Passing a directory (or a
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Whether you're looking to write code, improve documentation, or help triage issu

## Guidelines

- Run `make format` and `make lint-js` before submitting changes
- Ensure tests pass with `make test-js`, `make test-swift-package`, and `make test-android`
- Run `make format` and `make lint-web` before submitting changes
- Ensure tests pass with `make test-web-unit`, `make test-ios-library-simulator`, and `make test-android-library-unit`
- Follow the existing code style and patterns

## Releases
Expand Down
Loading
Loading