diff --git a/.gitignore b/.gitignore index ee043c9a3e4b21..3605aca9a61088 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ gutenberg.zip coverage *-performance-results.json .phpunit.result.cache +.reassure # Directories/files that may appear in your environment *.log diff --git a/bin/reassure-tests.sh b/bin/reassure-tests.sh new file mode 100644 index 00000000000000..da4e2479c951b2 --- /dev/null +++ b/bin/reassure-tests.sh @@ -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 \ No newline at end of file