Skip to content

Commit

Permalink
Performance tests: Install locked dependencies without resolution
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dmsnell committed Oct 12, 2022
1 parent 5d773ab commit 314b474
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/plugin/commands/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down Expand Up @@ -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' );
Expand Down

0 comments on commit 314b474

Please sign in to comment.