Skip to content
Merged
Changes from all commits
Commits
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: 3 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ jobs:
- name: Compare performance with base branch
if: github.event_name == 'push'
# The base hash used here need to be a commit that is compatible with the current WP version
# The current one is 7f6a627a028f6c5013dc97df316e04e8fc39a4ef and it needs to be updated every WP major release.
# The current one is 1b8efa77d39f68fb3d963ea02ce6ea6a8201d521 and it needs to be updated every WP major release.
# It is used as a base comparison point to avoid fluctuation in the performance metrics.
# See: https://developer.wordpress.org/block-editor/explanations/architecture/performance/#update-the-reference-commit.
run: |
WP_VERSION="$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)"
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf "$GITHUB_SHA" 7f6a627a028f6c5013dc97df316e04e8fc39a4ef --tests-branch "$GITHUB_SHA" --wp-version "$WP_MAJOR"
./bin/plugin/cli.js perf "$GITHUB_SHA" 1b8efa77d39f68fb3d963ea02ce6ea6a8201d521 --tests-branch "$GITHUB_SHA" --wp-version "$WP_MAJOR"

- name: Compare performance with custom branches
if: github.event_name == 'workflow_dispatch'
Expand All @@ -109,7 +109,7 @@ jobs:
CODEHEALTH_PROJECT_TOKEN: ${{ secrets.CODEHEALTH_PROJECT_TOKEN }}
run: |
COMMITTED_AT="$(git show -s "$GITHUB_SHA" --format="%cI")"
./bin/log-performance-results.js "$CODEHEALTH_PROJECT_TOKEN" trunk "$GITHUB_SHA" 7f6a627a028f6c5013dc97df316e04e8fc39a4ef "$COMMITTED_AT"
./bin/log-performance-results.js "$CODEHEALTH_PROJECT_TOKEN" trunk "$GITHUB_SHA" 1b8efa77d39f68fb3d963ea02ce6ea6a8201d521 "$COMMITTED_AT"

- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
Expand Down
Loading