-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (82 loc) · 2.52 KB
/
note-send-proof-tests.yml
File metadata and controls
97 lines (82 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Note Send Proof Tests
on:
push:
branches:
- next
pull_request:
branches:
- next
paths:
- "note-send-proof/**"
- ".github/workflows/note-send-proof-tests.yml"
workflow_dispatch:
jobs:
note-send-proof-tests:
name: Note Send Proof Tests
runs-on: ubuntu-latest
env:
AZTEC_ENV: local-network
AZTEC_VERSION: 4.2.0
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Enable Corepack for Yarn
run: corepack enable
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install Aztec CLI
run: |
INSTALL_URL="https://install.aztec.network/${{ env.AZTEC_VERSION }}/"
curl -sL $INSTALL_URL > tmp.sh
VERSION=${{ env.AZTEC_VERSION }} bash tmp.sh <<< yes "yes"
- name: Update path
run: |
echo "$HOME/.aztec/current/bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/node_modules/.bin" >> $GITHUB_PATH
echo "$HOME/.aztec/bin" >> $GITHUB_PATH
- name: Start local Aztec network
run: aztec start --local-network &
- name: Wait for local network to be ready
run: |
echo "Waiting for local network to start..."
for i in {1..30}; do
if curl -s http://localhost:8080/status >/dev/null 2>&1; then
echo "Local network is ready!"
break
fi
echo "Waiting... ($i/30)"
sleep 5
done
- name: Install project dependencies
working-directory: note-send-proof
run: yarn install
- name: Compile contract and generate artifacts
working-directory: note-send-proof
run: |
ulimit -s unlimited
script -e -c "yarn ccc"
- name: Generate note hash data
working-directory: note-send-proof
env:
NODE_OPTIONS: "--max-old-space-size=6144"
run: |
echo "Generating note hash data..."
yarn data
timeout-minutes: 15
- name: Run tests
working-directory: note-send-proof
run: yarn test
timeout-minutes: 15
- name: Upload test results if failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs
path: |
note-send-proof/tests/**/*.log
note-send-proof/data.json
retention-days: 7