Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI tasks and scripts to run mobile performance tests #49547

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,11 @@ jobs:
name: failures-artifacts
path: ${{ env.WP_ARTIFACTS_PATH }}
if-no-files-found: ignore

- name: Run mobile performance tests
run: ./gutenberg/bin/reassure-tests.sh

- name: Report mobile performance results
run: yarn danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dcalhoun marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gutenberg.zip
coverage
*-performance-results.json
.phpunit.result.cache
.reassure

# Directories/files that may appear in your environment
*.log
Expand Down
20 changes: 20 additions & 0 deletions bin/reassure-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e

# Move out of bin directory to Gutenberg project root
cd ../

BASELINE_BRANCH=${BASELINE_BRANCH:="trunk"}

# Required for `git switch` on CI
git fetch origin

# Gather baseline perf measurements
git switch "$BASELINE_BRANCH"
npm --cwd ci
npm run native test:perf --baseline

# Gather current perf measurements & compare results
git switch --detach -
npm ci
npm run native test:perf