update to use 3.0.0-devnet.2 #38
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sandbox Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| workflow_dispatch: | |
| jobs: | |
| sandbox-tests: | |
| name: Sandbox Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| AZTEC_ENV: sandbox | |
| VERSION: 3.0.0-devnet.2 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "yarn" | |
| - name: Set up Docker | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Install Aztec CLI | |
| run: | | |
| curl -s https://install.aztec.network > tmp.sh | |
| bash tmp.sh <<< yes "yes" | |
| - name: Update path | |
| run: echo "/home/runner/.aztec/bin" >> $GITHUB_PATH | |
| - name: Set Aztec version and start sandbox | |
| run: | | |
| VERSION=${{ env.VERSION }} aztec-up | |
| aztec start --sandbox & | |
| - name: Wait for sandbox to be ready | |
| run: | | |
| echo "Waiting for sandbox to start..." | |
| for i in {1..30}; do | |
| if curl -s http://localhost:8080/status >/dev/null 2>&1; then | |
| echo "✅ Sandbox is ready!" | |
| break | |
| fi | |
| echo "Waiting... ($i/30)" | |
| sleep 5 | |
| done | |
| - name: Install project dependencies | |
| run: yarn | |
| - name: Compile contracts | |
| run: script -e -c "${AZTEC_NARGO:-aztec-nargo} compile && aztec-postprocess-contract" | |
| - name: Generate contract artifacts | |
| run: script -e -c "aztec codegen target --outdir src/artifacts" | |
| - name: Change ownership for nargo files | |
| run: sudo chown -R $(whoami) ~/nargo && sudo chown -R $(whoami) ~/nargo/github.com | |
| - name: Run JavaScript tests | |
| run: | | |
| script -e -c "rm -rf store/pxe" | |
| script -e -c "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --config jest.integration.config.json" | |
| - name: Run Aztec tests | |
| run: script -e -c "aztec test" | |
| - name: Deploy account and capture credentials | |
| run: | | |
| script -e -c "yarn clear-store" | |
| TEMP_OUTPUT=$(mktemp) | |
| if script -e -c "yarn deploy-account" > "$TEMP_OUTPUT" 2>&1; then | |
| echo "✅ Deploy account script completed successfully" | |
| else | |
| echo "❌ Deploy account script failed" | |
| cat "$TEMP_OUTPUT" | |
| rm "$TEMP_OUTPUT" | |
| exit 1 | |
| fi | |
| cat "$TEMP_OUTPUT" | |
| SECRET_KEY=$(grep -o "🔑 Secret key generated: 0x[a-fA-F0-9]*" "$TEMP_OUTPUT" | head -1 | sed 's/🔑 Secret key generated: //' || echo "") | |
| SIGNING_KEY=$(grep -o "🖊️ Signing key generated: 0x[a-fA-F0-9]*" "$TEMP_OUTPUT" | head -1 | sed 's/🖊️ Signing key generated: //' || echo "") | |
| SALT_VALUE=$(grep -o "🧂 Salt generated: 0x[a-fA-F0-9]*" "$TEMP_OUTPUT" | head -1 | sed 's/🧂 Salt generated: //' || echo "") | |
| rm "$TEMP_OUTPUT" | |
| if [ -n "$SECRET_KEY" ] && [ -n "$SIGNING_KEY" ] && [ -n "$SALT_VALUE" ]; then | |
| echo "SECRET=\"$SECRET_KEY\"" >> .env | |
| echo "SIGNING_KEY=\"$SIGNING_KEY\"" >> .env | |
| echo "SALT=\"$SALT_VALUE\"" >> .env | |
| echo "📋 Saved credentials to .env file" | |
| else | |
| echo "❌ Failed to extract SECRET, SIGNING_KEY, and/or SALT from deploy output" | |
| exit 1 | |
| fi | |
| - name: Deploy contract and capture address | |
| run: | | |
| TEMP_OUTPUT=$(mktemp) | |
| if script -e -c "yarn deploy" > "$TEMP_OUTPUT" 2>&1; then | |
| echo "✅ Deploy script completed successfully" | |
| else | |
| cat "$TEMP_OUTPUT" | |
| rm "$TEMP_OUTPUT" | |
| exit 1 | |
| fi | |
| cat "$TEMP_OUTPUT" | |
| VOTING_CONTRACT_ADDRESS="" | |
| if [ -z "$VOTING_CONTRACT_ADDRESS" ]; then | |
| VOTING_CONTRACT_ADDRESS=$(grep -o "Contract address: 0x[a-fA-F0-9]*" "$TEMP_OUTPUT" | head -1 | sed 's/Contract address: //' || echo "") | |
| fi | |
| rm "$TEMP_OUTPUT" | |
| if [ -n "$VOTING_CONTRACT_ADDRESS" ]; then | |
| echo "VOTING_CONTRACT_ADDRESS=\"$VOTING_CONTRACT_ADDRESS\"" >> .env | |
| echo "📋 Saved contract address to .env file" | |
| fi | |
| - name: Run sandbox scripts | |
| run: | | |
| script -e -c "yarn fees" | |
| script -e -c "yarn multiple-wallet" | |
| script -e -c "yarn profile" | |
| script -e -c "yarn interaction-existing-contract" |