Skip to content

Commit

Permalink
Try fixing multi-node versions performance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jul 6, 2023
1 parent 6d3ecd2 commit 73379ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/performance.yml
Expand Up @@ -37,6 +37,13 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Install NVM
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm -v
- name: Compare performance with trunk
if: github.event_name == 'pull_request'
run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA
Expand Down
4 changes: 2 additions & 2 deletions bin/plugin/commands/performance.js
Expand Up @@ -285,7 +285,7 @@ async function runPerformanceTests( branches, options ) {

log( ' >> Installing dependencies and building packages' );
await runShellScript(
'npm ci && node ./bin/packages/build.js',
'bash -c "source $HOME/.nvm/nvm.sh && nvm install && nvm use && npm ci && node ./bin/packages/build.js"',
performanceTestDirectory
);
log( ' >> Creating the environment folders' );
Expand Down Expand Up @@ -321,7 +321,7 @@ async function runPerformanceTests( branches, options ) {

log( ` >> Building the ${ fancyBranch } branch` );
await runShellScript(
'npm ci && npm run prebuild:packages && node ./bin/packages/build.js && npx wp-scripts build',
'bash -c "source $HOME/.nvm/nvm.sh && nvm install && nvm use && npm ci && npm run prebuild:packages && node ./bin/packages/build.js && npx wp-scripts build"',
buildPath
);

Expand Down

0 comments on commit 73379ae

Please sign in to comment.