-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·51 lines (45 loc) · 900 Bytes
/
run_tests.sh
File metadata and controls
executable file
·51 lines (45 loc) · 900 Bytes
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
#!/bin/bash
echo "=== Running Flow Tests ==="
FAILED=0
# Backend tests
echo ""
echo "--- Backend Tests ---"
cd backend
if [ -d "venv" ]; then
source venv/bin/activate
fi
if ! pytest -v --cov=app; then
echo "Backend tests failed."
FAILED=1
fi
cd ..
# Frontend tests
echo ""
echo "--- Frontend Tests ---"
cd frontend
if ! npm test -- --run; then
echo "Frontend tests failed."
FAILED=1
fi
cd ..
# Contract tests
echo ""
echo "--- Contract Tests ---"
cd contracts
if command -v forge &> /dev/null; then
if ! forge test -vvv; then
echo "Contract tests failed."
FAILED=1
fi
else
echo "Foundry not installed. Skipping contract tests."
echo "Install with: curl -L https://foundry.paradigm.xyz | bash && foundryup"
fi
cd ..
echo ""
if [ $FAILED -ne 0 ]; then
echo "=== Some Tests Failed ==="
exit 1
else
echo "=== All Tests Passed ==="
fi