Skip to content

Commit feac657

Browse files
committed
fix(tasks): restore test.sh in worktree with SQLx support
CI runs on the branch, not main - needs test.sh in the worktree. This version calls both test:legacy AND test:sqlx.
1 parent a61fae7 commit feac657

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

tasks/test.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Run all tests (legacy SQL + SQLx Rust)"
3+
#USAGE flag "--postgres <version>" help="PostgreSQL version to test against" default="17" {
4+
#USAGE choices "14" "15" "16" "17"
5+
#USAGE }
6+
7+
set -euo pipefail
8+
9+
POSTGRES_VERSION=${usage_postgres}
10+
11+
echo "=========================================="
12+
echo "Running Complete EQL Test Suite"
13+
echo "PostgreSQL Version: $POSTGRES_VERSION"
14+
echo "=========================================="
15+
echo ""
16+
17+
# Check PostgreSQL is running
18+
"$(dirname "$0")/check-postgres.sh" ${POSTGRES_VERSION}
19+
20+
# Build first
21+
echo "Building EQL..."
22+
mise run build --force
23+
24+
# Run legacy SQL tests
25+
echo ""
26+
echo "=========================================="
27+
echo "1/2: Running Legacy SQL Tests"
28+
echo "=========================================="
29+
mise run test:legacy --postgres ${POSTGRES_VERSION}
30+
31+
# Run SQLx Rust tests
32+
echo ""
33+
echo "=========================================="
34+
echo "2/2: Running SQLx Rust Tests"
35+
echo "=========================================="
36+
mise run test:sqlx
37+
38+
echo ""
39+
echo "=========================================="
40+
echo "✅ ALL TESTS PASSED"
41+
echo "=========================================="
42+
echo ""
43+
echo "Summary:"
44+
echo " ✓ Legacy SQL tests"
45+
echo " ✓ SQLx Rust tests"
46+
echo ""

0 commit comments

Comments
 (0)