Skip to content

Commit 9b5a202

Browse files
committed
fix(ci): install nvm in acceptance test runner for macOS
1 parent d8ceda4 commit 9b5a202

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

.github/workflows/aztec-cli-acceptance-test.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ jobs:
3636
with:
3737
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
3838

39-
# Node is only used to run the .ts harness in run-test.sh, which needs >=22.18 for TS
40-
# type-stripping. The aztec CLI installer manages its own node version independently.
41-
- name: Setup Node.js
42-
uses: actions/setup-node@v4
43-
with:
44-
node-version: 22
45-
4639
- name: Run Aztec CLI acceptance test
4740
timeout-minutes: 30
4841
run: ./aztec-up/test/aztec-cli-acceptance-test/run-test.sh

aztec-up/test/aztec-cli-acceptance-test/run-test.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Launcher for the Aztec CLI acceptance test.
33
#
44
# Steps:
5-
# 1. Install Node via NVM if not present (skipped with SKIP_INSTALL=1)
5+
# 1. Install NVM and the latest LTS Node (skipped with SKIP_INSTALL=1). NVM is required by the
6+
# aztec installer to upgrade Node when the system version is too old.
67
# 2. Install the Aztec toolchain via the public installer (skipped with SKIP_INSTALL=1)
78
# 3. Run aztec-cli-acceptance-test.ts which exercises the installed toolchain end-to-end
89
#
@@ -20,14 +21,17 @@ else
2021
echo "ERROR: VERSION must be set when SKIP_INSTALL is not 1." >&2
2122
exit 1
2223
fi
23-
if ! command -v node &>/dev/null; then
24-
echo ">>> Installing Node via NVM"
24+
if [ ! -f "$HOME/.nvm/nvm.sh" ]; then
25+
echo ">>> Installing NVM"
2526
curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh -o /tmp/nvm-install.sh
2627
PROFILE=/dev/null bash /tmp/nvm-install.sh
27-
export NVM_DIR="$HOME/.nvm"
28-
set +eu; . "$NVM_DIR/nvm.sh"; set -eu
29-
nvm install --lts
3028
fi
29+
30+
# Install latest LTS node, since we need it to run the acceptance test correctly
31+
export NVM_DIR="$HOME/.nvm"
32+
set +eu; . "$NVM_DIR/nvm.sh"; set -eu
33+
echo ">>> Installing latest LTS Node via NVM"
34+
nvm install --lts
3135
echo ">>> Installing aztec ${VERSION}"
3236
NO_NEW_SHELL=1 VERSION="${VERSION}" bash <(curl -sL https://install.aztec.network)
3337
fi

0 commit comments

Comments
 (0)