|
1 | 1 | # Test tasks for EQL |
2 | | -# Combines legacy SQL tests and modern SQLx Rust tests |
3 | | - |
4 | | -["test:all"] |
5 | | -description = "Run ALL tests: legacy SQL + SQLx (full test suite)" |
6 | | -depends = ["build"] |
7 | | -run = """ |
8 | | -#!/bin/bash |
9 | | -set -euo pipefail |
10 | | -
|
11 | | -POSTGRES_VERSION="${POSTGRES_VERSION:-17}" |
12 | | -
|
13 | | -echo "==========================================" |
14 | | -echo "Running Complete EQL Test Suite" |
15 | | -echo "PostgreSQL Version: $POSTGRES_VERSION" |
16 | | -echo "==========================================" |
17 | | -echo "" |
18 | | -
|
19 | | -# Ensure PostgreSQL is running |
20 | | -echo "→ Starting PostgreSQL $POSTGRES_VERSION..." |
21 | | -mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" |
22 | | -
|
23 | | -# Run legacy SQL tests |
24 | | -echo "" |
25 | | -echo "==========================================" |
26 | | -echo "1/2: Running Legacy SQL Tests" |
27 | | -echo "==========================================" |
28 | | -mise run test:legacy --skip-build --postgres ${POSTGRES_VERSION} |
29 | | -
|
30 | | -# Run SQLx Rust tests |
31 | | -echo "" |
32 | | -echo "==========================================" |
33 | | -echo "2/2: Running SQLx Rust Tests" |
34 | | -echo "==========================================" |
35 | | -mise run test:sqlx |
36 | | -
|
37 | | -echo "" |
38 | | -echo "==========================================" |
39 | | -echo "✅ ALL TESTS PASSED" |
40 | | -echo "==========================================" |
41 | | -echo "" |
42 | | -echo "Summary:" |
43 | | -echo " ✓ Legacy SQL tests" |
44 | | -echo " ✓ SQLx Rust tests" |
45 | | -echo "" |
46 | | -""" |
| 2 | +# Legacy SQL tests (inline test files) |
47 | 3 |
|
48 | 4 | ["test:legacy"] |
49 | 5 | description = "Run legacy SQL tests (inline test files)" |
50 | | -alias = "test" |
51 | 6 | sources = ["src/**/*_test.sql", "tests/*.sql"] |
52 | 7 | run = "{{config_root}}/tasks/test-legacy.sh" |
53 | | - |
54 | | -["test:quick"] |
55 | | -description = "Quick test (skip build, use existing)" |
56 | | -depends = [] |
57 | | -run = """ |
58 | | -echo "Running quick tests (using existing build)..." |
59 | | -mise run test:legacy --skip-build |
60 | | -""" |
0 commit comments