Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/workflows/aztec-cli-acceptance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ on:

jobs:
release-acceptance:
runs-on: ubuntu-latest
strategy:
fail-fast: false # Don't cancel the other OS if one fails.
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run'
Expand All @@ -32,19 +36,24 @@ jobs:
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}

# Node is only used to run the .ts harness in run-test.sh, which needs >=22.18 for TS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are now handling this in run-test.sh

# type-stripping. The aztec CLI installer manages its own node version independently.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Run Aztec CLI acceptance test
timeout-minutes: 30
run: ./aztec-up/test/aztec-cli-acceptance-test/run-test.sh

notify:
needs: release-acceptance
if: always() && github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}

- name: Notify Slack on success
if: success() && github.event_name != 'workflow_dispatch'
if: needs.release-acceptance.result == 'success'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
run: |
Expand All @@ -54,7 +63,7 @@ jobs:
"#team-fairies"

- name: Notify Slack and dispatch ClaudeBox on failure
if: failure() && github.event_name != 'workflow_dispatch'
if: needs.release-acceptance.result == 'failure'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
Expand Down
16 changes: 10 additions & 6 deletions aztec-up/test/aztec-cli-acceptance-test/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Launcher for the Aztec CLI acceptance test.
#
# Steps:
# 1. Install Node via NVM if not present (skipped with SKIP_INSTALL=1)
# 1. Install NVM and the latest LTS Node (skipped with SKIP_INSTALL=1). NVM is required by the
# aztec installer to upgrade Node when the system version is too old.
# 2. Install the Aztec toolchain via the public installer (skipped with SKIP_INSTALL=1)
# 3. Run aztec-cli-acceptance-test.ts which exercises the installed toolchain end-to-end
#
Expand All @@ -20,14 +21,17 @@ else
echo "ERROR: VERSION must be set when SKIP_INSTALL is not 1." >&2
exit 1
fi
if ! command -v node &>/dev/null; then
echo ">>> Installing Node via NVM"
if [ ! -f "$HOME/.nvm/nvm.sh" ]; then
echo ">>> Installing NVM"
curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh -o /tmp/nvm-install.sh
PROFILE=/dev/null bash /tmp/nvm-install.sh
export NVM_DIR="$HOME/.nvm"
set +eu; . "$NVM_DIR/nvm.sh"; set -eu
nvm install --lts
fi

# Install latest LTS node, since we need it to run the acceptance test correctly
export NVM_DIR="$HOME/.nvm"
set +eu; . "$NVM_DIR/nvm.sh"; set -eu
echo ">>> Installing latest LTS Node via NVM"
nvm install --lts
echo ">>> Installing aztec ${VERSION}"
Comment on lines +30 to 35

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We always install LTS node, so we can make sure we can run the test properly

NO_NEW_SHELL=1 VERSION="${VERSION}" bash <(curl -sL https://install.aztec.network)
fi
Expand Down
Loading