Skip to content

Commit 8406f5c

Browse files
committed
chore: add run_tests.sh script
1 parent 2388ce5 commit 8406f5c

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

run_tests.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
LOG_FILE="logs.txt"
3+
4+
# Clear existing log file
5+
> "$LOG_FILE"
6+
7+
run_command() {
8+
local name="$1"
9+
local cmd="$2"
10+
echo "=== Running: $name ===" >> "$LOG_FILE"
11+
echo "Command: $cmd" >> "$LOG_FILE"
12+
echo "Timestamp: $(date)" >> "$LOG_FILE"
13+
echo "----------------------------------------" >> "$LOG_FILE"
14+
eval "$cmd" >> "$LOG_FILE" 2>&1
15+
local exit_code=$?
16+
echo "Exit code: $exit_code" >> "$LOG_FILE"
17+
echo "========================================" >> "$LOG_FILE"
18+
echo "" >> "$LOG_FILE"
19+
return $exit_code
20+
}
21+
22+
run_command "bun test" "bun test"
23+
run_command "bun run test" "bun run test"
24+
run_command "bun lint" "bun lint"
25+
run_command "bun run lint" "bun run lint"
26+
run_command "bun typecheck" "bun typecheck"
27+
run_command "bun run typecheck" "bun run typecheck"
28+
29+
echo "All commands executed. Output saved to $LOG_FILE"

0 commit comments

Comments
 (0)