diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 2fd8ca4777408a..5f4a454918386a 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -44,6 +44,13 @@ jobs: if: github.event_name == 'pull_request' run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA + - name: Store post-editor perf trace + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1 + with: + name: perf-test-trace + path: /home/runner/perf-post-editor-trace.json + - name: Compare performance with current WordPress Core and previous Gutenberg versions if: github.event_name == 'release' env: diff --git a/packages/e2e-tests/specs/performance/post-editor.test.js b/packages/e2e-tests/specs/performance/post-editor.test.js index 10699f921be510..558adff905981e 100644 --- a/packages/e2e-tests/specs/performance/post-editor.test.js +++ b/packages/e2e-tests/specs/performance/post-editor.test.js @@ -23,7 +23,6 @@ import { */ import { readFile, - deleteFile, getTypingEventDurations, getClickEventDurations, getHoverEventDurations, @@ -77,7 +76,9 @@ describe( 'Post Editor Performance', () => { inserterHover: [], inserterSearch: [], }; - const traceFile = __dirname + '/trace.json'; + const traceFile = '/home/runner/perf-post-editor-trace.json'; + // eslint-disable-next-line no-console + console.log( `Storing trace in ${ traceFile }` ); let traceResults; afterAll( async () => { @@ -86,7 +87,6 @@ describe( 'Post Editor Performance', () => { join( __dirname, resultsFilename ), JSON.stringify( results, null, 2 ) ); - deleteFile( traceFile ); } ); beforeEach( async () => {