Skip to content

Commit 0803c5f

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 0803c5f

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

tasks/test.sh

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

0 commit comments

Comments
 (0)