-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathscript-starklings.sh
More file actions
50 lines (39 loc) · 1.32 KB
/
script-starklings.sh
File metadata and controls
50 lines (39 loc) · 1.32 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
#!/bin/bash
# 1. Nettoyer les éventuels anciens dossiers
echo "🧹 Cleaning up previous installations..."
rm -rf starklings
# 2. Cloner le repo starklings
echo "📦 Cloning starklings repository..."
git clone https://github.com/shramee/starklings.git
if [ $? -ne 0 ]; then
echo "❌ Failed to clone starklings repository"
exit 1
fi
# 3. Changer vers la branche feat/upgrade-cairo-and-use-scarb
echo "🔄 Switching to feat/upgrade-cairo-and-use-scarb branch..."
cd starklings
git checkout feat/upgrade-cairo-and-use-scarb
if [ $? -ne 0 ]; then
echo "❌ Failed to switch to feat/upgrade-cairo-and-use-scarb branch"
exit 1
fi
# 4. Retourner au dossier parent
cd ..
# Vérifier si le serveur répond
if ! curl -s http://localhost:3001/ > /dev/null 2>&1; then
echo "❌ Server failed to start"
kill $SERVER_PID 2>/dev/null || true
exit 1
fi
# 8. Lancer le test avec un seul exercice
echo "🎯 Running single Starklings evaluation..."
# SINGLE_EXERCISE=starknet3 node .github/scripts/starklings-evaluate.js
node .github/scripts/starklings-evaluate.js
# 9. Nettoyer
echo "🧹 Cleaning up..."
kill $SERVER_PID 2>/dev/null || true
if command -v docker &> /dev/null; then
docker stop cairo-coder-test-db 2>/dev/null || true
docker rm cairo-coder-test-db 2>/dev/null || true
fi
echo "✅ Test completed!"