-
Notifications
You must be signed in to change notification settings - Fork 7
110 lines (93 loc) · 3.05 KB
/
streaming-payments-tests.yml
File metadata and controls
110 lines (93 loc) · 3.05 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
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Streaming Payments Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "streaming-payments/**"
- ".github/workflows/streaming-payments-tests.yml"
workflow_dispatch:
jobs:
streaming-payments-tests:
name: Streaming Payments Tests
runs-on: ubuntu-latest
env:
AZTEC_ENV: local-network
AZTEC_VERSION: 3.0.0-devnet.20251212
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: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Install Aztec CLI
run: |
curl -s https://install.aztec.network > tmp.sh
NON_INTERACTIVE=1 bash tmp.sh
rm tmp.sh
- name: Update path
run: echo "$HOME/.aztec/bin" >> $GITHUB_PATH
- name: Set Aztec version
run: aztec-up ${{ env.AZTEC_VERSION }}
- name: Run setup script (download Token contract and compile)
working-directory: streaming-payments
run: |
chmod +x scripts/setup-token.sh
./scripts/setup-token.sh
timeout-minutes: 15
- name: Run Noir unit and integration tests (TXE)
working-directory: streaming-payments
run: aztec test --package streaming_payments_contract
timeout-minutes: 10
- name: Start local network for e2e tests
run: |
docker tag aztecprotocol/aztec:${{ env.AZTEC_VERSION }} aztecprotocol/aztec:latest
aztec start --local-network &
- name: Wait for local network to be ready
run: |
echo "Waiting for local network to start..."
MAX_RETRIES=60
for i in $(seq 1 $MAX_RETRIES); do
if curl -s http://localhost:8080/status >/dev/null 2>&1; then
echo "✅ Local network is ready!"
break
fi
if [ $i -eq $MAX_RETRIES ]; then
echo "❌ Local network failed to start after $MAX_RETRIES attempts"
exit 1
fi
echo "Waiting... ($i/$MAX_RETRIES)"
sleep 2
done
- name: Install project dependencies
working-directory: streaming-payments
run: yarn install
- name: Run e2e TypeScript tests
working-directory: streaming-payments
run: yarn test
timeout-minutes: 15
- name: Upload test results if failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: streaming-payments-test-logs
path: |
streaming-payments/target/**
streaming-payments/.deps/**
streaming-payments/pxe-test-data/**
retention-days: 7
- name: Cleanup
if: always()
run: |
echo "Stopping Aztec local network..."
pkill -f "aztec" || true
docker stop $(docker ps -q) || true
docker rm $(docker ps -a -q) || true