From 566c21016417435fd2e8fa07b0100efeded50d02 Mon Sep 17 00:00:00 2001 From: 81reap Date: Fri, 25 Sep 2026 16:07:49 -0400 Subject: [PATCH 1/2] feat(ci) :: run the database matrix against DuckDB Before the matrix covered sqlite, postgres, mysql, mssql, psqlODBC and Oracle. DuckDB was only used to build the `-duckdb` Docker image. Now DuckDB joins the matrix and runs in `/tmp/sqlpage-test.duckdb`. --- .github/workflows/ci.yml | 8 ++++++++ docker-compose.yml | 1 + 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3d04df38..bec6584c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,9 @@ jobs: - database: oracle container: oracle db_url: "Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!" + - database: duckdb + container: "" + db_url: "Driver=DuckDB;Database=/tmp/sqlpage-test.duckdb" steps: - uses: actions/checkout@v7 # Reuse the exact Linux test harnesses produced by compile_and_lint. @@ -121,6 +124,11 @@ jobs: - name: Install PostgreSQL ODBC driver if: matrix.setup_odbc run: sudo apt-get install -y odbc-postgresql + - name: Install DuckDB ODBC driver + if: matrix.database == 'duckdb' + run: | + sudo apt-get update && sudo apt-get install -y unixodbc unzip + sudo scripts/install-duckdb-odbc.sh - name: Install Oracle ODBC driver if: matrix.database == 'oracle' run: | diff --git a/docker-compose.yml b/docker-compose.yml index 463a297e2..4b3b459f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,7 @@ # DATABASE_URL='mysql://root:Password123!@localhost/sqlpage' # DATABASE_URL='Driver={/usr/lib64/psqlodbcw.so};Server=127.0.0.1;Port=5432;Database=sqlpage;UID=root;PWD=Password123!' # DATABASE_URL='Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!' +# DATABASE_URL='Driver=DuckDB;Database=/tmp/sqlpage-test.duckdb' # Run for instance: # docker compose up postgres From 5697b6522edaa1ac59097982a45835e33a432a76 Mon Sep 17 00:00:00 2001 From: Ophir Lojkine Date: Sat, 26 Sep 2026 12:19:16 +0000 Subject: [PATCH 2/2] ci: remove PostgreSQL ODBC tests --- .github/workflows/ci.yml | 7 ------- AGENTS.md | 2 +- docker-compose.yml | 1 - .../data/variable_comparison_without_type_context.sql | 2 +- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bec6584c5..3e6eb4eba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,10 +97,6 @@ jobs: - database: mssql container: mssql db_url: "mssql://root:Password123!@127.0.0.1/sqlpage" - - database: odbc - container: postgres - db_url: "Driver=PostgreSQL Unicode;Server=127.0.0.1;Port=5432;Database=sqlpage;UID=root;PWD=Password123!" - setup_odbc: true - database: oracle container: oracle db_url: "Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!" @@ -121,9 +117,6 @@ jobs: run: | mkdir -p target/sqlpage-test-binaries tar -xzf target/sqlpage-linux-test-binaries.tar.gz -C target/sqlpage-test-binaries - - name: Install PostgreSQL ODBC driver - if: matrix.setup_odbc - run: sudo apt-get install -y odbc-postgresql - name: Install DuckDB ODBC driver if: matrix.database == 'duckdb' run: | diff --git a/AGENTS.md b/AGENTS.md index b60e9add5..6448e0b28 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -118,7 +118,7 @@ docker compose up --wait mssql # or postgres, mysql, mariadb, oracle DATABASE_URL='mssql://root:Password123!@localhost/sqlpage' cargo test ``` -ODBC tests require the database-specific ODBC driver on the host; starting the container is not sufficient. See the PostgreSQL ODBC and Oracle matrix entries in [CI](./.github/workflows/ci.yml) for driver setup and connection strings. On Linux and macOS, `cargo test --features odbc-static` matches CI's static unixODBC linking. +ODBC tests require the database-specific ODBC driver on the host; starting the container is not sufficient. See the Oracle and DuckDB matrix entries in [CI](./.github/workflows/ci.yml) for driver setup and connection strings. On Linux and macOS, `cargo test --features odbc-static` matches CI's static unixODBC linking. For dynamic frontend changes, run the Playwright tests under `tests/end-to-end/` as described in [CONTRIBUTING.md](./CONTRIBUTING.md). Component browser tests belong in `tests/end-to-end/fixtures//{index.sql,test.ts}` and must import the shared `fixture.ts` harness. Exercise components through SQL fixtures and normal page initialization; do not inject synthetic component DOM or call private initialization functions. Prefer Playwright locators and web-first assertions. For examples containing `test.hurl`, run `scripts/test-examples-hurl.sh `. diff --git a/docker-compose.yml b/docker-compose.yml index 4b3b459f5..677996dde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,6 @@ # DATABASE_URL='postgres://root:Password123!@localhost/sqlpage' # DATABASE_URL='mssql://root:Password123!@localhost/sqlpage' # DATABASE_URL='mysql://root:Password123!@localhost/sqlpage' -# DATABASE_URL='Driver={/usr/lib64/psqlodbcw.so};Server=127.0.0.1;Port=5432;Database=sqlpage;UID=root;PWD=Password123!' # DATABASE_URL='Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!' # DATABASE_URL='Driver=DuckDB;Database=/tmp/sqlpage-test.duckdb' diff --git a/tests/sql_test_files/data/variable_comparison_without_type_context.sql b/tests/sql_test_files/data/variable_comparison_without_type_context.sql index 1027f8348..d2b7d5172 100644 --- a/tests/sql_test_files/data/variable_comparison_without_type_context.sql +++ b/tests/sql_test_files/data/variable_comparison_without_type_context.sql @@ -1,3 +1,3 @@ --- Context-free variables (no column or literal) need CAST on SQLite and psqlodbc +-- Context-free variables (no column or literal) need CAST on SQLite SET other = 'other'; select 'It works !' as expected, 'It works !' as actual where $x <> $other or $x is null;