-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-builds.sh
More file actions
executable file
·48 lines (40 loc) · 1.01 KB
/
test-builds.sh
File metadata and controls
executable file
·48 lines (40 loc) · 1.01 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
#!/bin/bash
# Script to test builds for all project folders
folders=(
"00-starter"
"01-server-components/start"
"01-server-components/checkpoint"
"01-server-components/complete"
"02-react-patterns/start"
"02-react-patterns/checkpoint"
"02-react-patterns/complete"
"03-tanstack-query/start"
"03-tanstack-query/checkpoint"
"03-tanstack-query/complete"
"04-advanced-patterns/start"
"04-advanced-patterns/checkpoint"
"04-advanced-patterns/complete"
)
echo "Testing builds for all projects..."
echo "=================================="
failed_builds=()
for folder in "${folders[@]}"; do
echo -n "Testing $folder... "
cd "$folder"
if npm run build > /dev/null 2>&1; then
echo "✅ PASS"
else
echo "❌ FAIL"
failed_builds+=("$folder")
fi
cd - > /dev/null
done
echo "=================================="
if [ ${#failed_builds[@]} -eq 0 ]; then
echo "🎉 All builds passed!"
else
echo "❌ Failed builds:"
for failed in "${failed_builds[@]}"; do
echo " - $failed"
done
fi