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
2 changes: 1 addition & 1 deletion aztec-up/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ EOF
}

function test_cmds {
for test in amm_flow bridge_and_claim basic_install counter_contract; do
for test in amm_flow bridge_and_claim basic_install counter_contract default_scaffold; do
echo "$hash:TIMEOUT=15m aztec-up/scripts/run_test.sh $test"
done
}
Expand Down
36 changes: 36 additions & 0 deletions aztec-up/test/default_scaffold.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail

# Tests that the default scaffold generated by `aztec new` compiles and passes its tests without any modifications.
# This catches regressions in the template files produced by setup_workspace.sh (e.g. syntax errors, stale imports,
# or API changes in aztec-nr) that would otherwise go unnoticed until a user runs `aztec new` themselves.

export LOG_LEVEL=silent

aztec new my_contract

# Verify workspace structure.
if [ ! -f my_contract/Nargo.toml ]; then
echo "Failed to create workspace Nargo.toml."
exit 1
fi
if [ ! -f my_contract/contract/Nargo.toml ] || [ ! -f my_contract/contract/src/main.nr ]; then
echo "Failed to create contract crate."
exit 1
fi
if [ ! -f my_contract/test/Nargo.toml ] || [ ! -f my_contract/test/src/lib.nr ]; then
echo "Failed to create test crate."
exit 1
fi

cd my_contract

# This is unfortunate as it makes the test worse but in CI setting the aztec version is 0.0.1 which doesn't exist as
# a remote git tag, so we need to rewrite dependencies to use local aztec-nr.
sed -i 's|aztec = .*git.*AztecProtocol/aztec-nr.*|aztec = { path="/home/ubuntu/aztec-packages/noir-projects/aztec-nr/aztec" }|' contract/Nargo.toml test/Nargo.toml

# Compile the default scaffold contract.
aztec compile

# Run the default scaffold tests.
aztec test
Loading