From 314b474c5e77f6464c929c3e38a0d307cd07ae7d Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Tue, 11 Oct 2022 10:52:55 -0700 Subject: [PATCH] Performance tests: Install locked dependencies without resolution When running the performance tests we're installing our `npm` dependencies using `npm install`. This not only takes longer to run than `npm ci`, but also results in non-deterministic builds which could flavor the results of our tests. In this patch we're using `npm ci` instead which should result in more consistent test runs with less setup overhead. --- bin/plugin/commands/performance.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/plugin/commands/performance.js b/bin/plugin/commands/performance.js index 1b0d85a2bb1400..c4a500b105c263 100644 --- a/bin/plugin/commands/performance.js +++ b/bin/plugin/commands/performance.js @@ -161,10 +161,7 @@ async function setUpGitBranch( branch, environmentDirectory ) { await git.checkoutRemoteBranch( environmentDirectory, branch ); log( ' >> Building the ' + formats.success( branch ) + ' branch' ); - await runShellScript( - 'npm install && npm run build', - environmentDirectory - ); + await runShellScript( 'npm ci && npm run build', environmentDirectory ); } /** @@ -235,7 +232,7 @@ async function runPerformanceTests( branches, options ) { } log( ' >> Installing dependencies and building packages' ); await runShellScript( - 'npm install && npm run build:packages', + 'npm ci && npm run build:packages', performanceTestDirectory ); log( ' >> Creating the environment folders' );