Skip to content

Commit 0289202

Browse files
authored
Merge pull request #16 from AztecProtocol/add-new-wallet-example-and-explainer
feat: add wallet example with webapp and explainer
2 parents 4230e93 + ffc02de commit 0289202

File tree

18 files changed

+7236
-0
lines changed

18 files changed

+7236
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Test Wallet Webapp Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
paths:
11+
- "test-wallet-webapp/**"
12+
- ".github/workflows/test-wallet-webapp-tests.yml"
13+
workflow_dispatch:
14+
15+
jobs:
16+
test-wallet-webapp-tests:
17+
name: Test Wallet Webapp Tests
18+
runs-on: ubuntu-latest
19+
env:
20+
AZTEC_VERSION: 3.0.0-devnet.5
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v5
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: "22"
30+
31+
- name: Enable Corepack
32+
run: corepack enable
33+
34+
- name: Set up Docker
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Install Aztec CLI
38+
run: |
39+
curl -s https://install.aztec.network > tmp.sh
40+
NON_INTERACTIVE=1 bash tmp.sh
41+
rm tmp.sh
42+
43+
- name: Update path
44+
run: echo "$HOME/.aztec/bin" >> $GITHUB_PATH
45+
46+
- name: Set Aztec version and start sandbox
47+
run: |
48+
aztec-up ${{ env.AZTEC_VERSION }}
49+
docker tag aztecprotocol/aztec:${{ env.AZTEC_VERSION }} aztecprotocol/aztec:latest
50+
aztec start --sandbox &
51+
52+
- name: Wait for sandbox to be ready
53+
run: |
54+
echo "Waiting for sandbox to start..."
55+
MAX_RETRIES=60
56+
for i in $(seq 1 $MAX_RETRIES); do
57+
if curl -s http://localhost:8080/status >/dev/null 2>&1; then
58+
echo "✅ Sandbox is ready!"
59+
break
60+
fi
61+
if [ $i -eq $MAX_RETRIES ]; then
62+
echo "❌ Sandbox failed to start after $MAX_RETRIES attempts"
63+
exit 1
64+
fi
65+
echo "Waiting... ($i/$MAX_RETRIES)"
66+
sleep 2
67+
done
68+
69+
- name: Install project dependencies
70+
working-directory: test-wallet-webapp
71+
run: yarn install --frozen-lockfile
72+
73+
- name: Run lint
74+
working-directory: test-wallet-webapp
75+
run: yarn lint
76+
77+
- name: Build project
78+
working-directory: test-wallet-webapp
79+
run: yarn build
80+
81+
- name: Upload build artifacts if failed
82+
if: failure()
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: build-artifacts
86+
path: |
87+
test-wallet-webapp/dist/
88+
test-wallet-webapp/node_modules/.vite/
89+
retention-days: 7
90+
91+
- name: Cleanup
92+
if: always()
93+
run: |
94+
echo "Stopping Aztec sandbox..."
95+
pkill -f "aztec" || true
96+
docker stop $(docker ps -q) || true
97+
docker rm $(docker ps -a -q) || true

test-wallet-webapp/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

0 commit comments

Comments
 (0)