Skip to content

Commit

Permalink
Add Reassure CI tasks and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
derekblank committed Apr 3, 2023
1 parent 9c5ce7e commit b466599
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
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 }}
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

0 comments on commit b466599

Please sign in to comment.