From ce27e7177b81553370ebca5f529735046e35bf06 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 12:52:56 -0600 Subject: [PATCH 1/8] ci: split rust and python sections We were getting strange errors due to out of storage, so maybe splitting will help? --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efdb034..dc2e11f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,19 @@ jobs: test: name: Test runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: Swatinem/rust-cache@v2 + - name: Lint + run: | + cargo fmt --check + cargo check --workspace + cargo clippy --workspace --tests -- -D warnings + - name: Test + run: cargo test + test-python: + name: Test Python + runs-on: ubuntu-latest strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] @@ -24,9 +37,12 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Lint - run: scripts/lint + run: | + uv run mypy python + uv run ruff check + uv run ruff format --check - name: Test - run: scripts/test + run: uv run pytest - name: CLI smoke test run: uv run cql2 < examples/text/example01.txt build-wasm: From ade0cb3e05ecfa14ef815a090458ec45246f431c Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 13:22:08 -0600 Subject: [PATCH 2/8] fix: put duckdb bundling behind a (default) feature --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc2e11f..0dc73c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,9 @@ jobs: run: | cargo fmt --check cargo check --workspace - cargo clippy --workspace --tests -- -D warnings + cargo clippy --workspace --tests --no-default-features -- -D warnings - name: Test - run: cargo test + run: cargo test --no-default-features # the only feature turns on DuckDB bundling for tests test-python: name: Test Python runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index b7dab9b..9923637 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,9 @@ repository = { workspace = true } license = { workspace = true } keywords = ["cql2"] +[features] +default = ["dev-duckdb-bundled"] +dev-duckdb-bundled = ["duckdb/bundled"] # we don't want most folks to have to install DuckDB to test, but we want to avoid bundling on CI [dependencies] geo = "0.31.0" @@ -45,7 +48,7 @@ sqlparser = { version = "0.58.0", features = ["visitor"] } [dev-dependencies] assert-json-diff = "2" -duckdb = { version = "1.3.2", features = ["bundled"] } +duckdb = "1.3.2" rstest = "0.26.1" [workspace] From d1890978275c0fba8189df64bbedff0ca52f5ab2 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 13:27:50 -0600 Subject: [PATCH 3/8] fix: actually install duckdb --- .github/workflows/ci.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dc73c2..a5480b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,18 +10,31 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + duckdb-version: "1.3.2" + jobs: test: name: Test runs-on: ubuntu-latest + env: + DUCKDB_LIB_DIR: ${{ github.workspace }}/opt/duckdb + LD_LIBRARY_PATH: ${{ github.workspace }}/opt/duckdb + DYLD_LIBRARY_PATH: ${{ github.workspace }}/opt/duckdb steps: - uses: actions/checkout@v5 - uses: Swatinem/rust-cache@v2 - - name: Lint + - name: Install libduckdb run: | - cargo fmt --check - cargo check --workspace - cargo clippy --workspace --tests --no-default-features -- -D warnings + wget https://github.com/duckdb/duckdb/releases/download/v${{ env.duckdb-version }}/libduckdb-linux-amd64.zip + mkdir -p ${{ github.workspace }}/opt/duckdb + unzip libduckdb-${{ matrix.os.duckdb-slug }}.zip -d ${{ github.workspace }}/opt/duckdb + - name: Format + run: cargo fmt --check + - name: Check + run: cargo check --workspace + - name: Clippy + run: cargo clippy --workspace --tests --no-default-features -- -D warnings - name: Test run: cargo test --no-default-features # the only feature turns on DuckDB bundling for tests test-python: From 4fb88900fff99dd16821799ccd934d5e25c84b23 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 13:30:10 -0600 Subject: [PATCH 4/8] fix: unzip duckdb --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5480b3..33f2b6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: run: | wget https://github.com/duckdb/duckdb/releases/download/v${{ env.duckdb-version }}/libduckdb-linux-amd64.zip mkdir -p ${{ github.workspace }}/opt/duckdb - unzip libduckdb-${{ matrix.os.duckdb-slug }}.zip -d ${{ github.workspace }}/opt/duckdb + unzip libduckdb-linux-amd64.zip -d ${{ github.workspace }}/opt/duckdb - name: Format run: cargo fmt --check - name: Check From 1ce8e0f7a1b2ed849a4178c6f526715fc51f651e Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 13:52:39 -0600 Subject: [PATCH 5/8] fix: at this point, we're just flailing --- .github/workflows/ci.yml | 9 ++------- Cargo.toml | 6 +----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33f2b6a..33e675d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,19 +24,14 @@ jobs: steps: - uses: actions/checkout@v5 - uses: Swatinem/rust-cache@v2 - - name: Install libduckdb - run: | - wget https://github.com/duckdb/duckdb/releases/download/v${{ env.duckdb-version }}/libduckdb-linux-amd64.zip - mkdir -p ${{ github.workspace }}/opt/duckdb - unzip libduckdb-linux-amd64.zip -d ${{ github.workspace }}/opt/duckdb - name: Format run: cargo fmt --check - name: Check run: cargo check --workspace - name: Clippy - run: cargo clippy --workspace --tests --no-default-features -- -D warnings + run: cargo clippy --workspace --tests -- -D warnings - name: Test - run: cargo test --no-default-features # the only feature turns on DuckDB bundling for tests + run: cargo test test-python: name: Test Python runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 9923637..600d879 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,10 +22,6 @@ repository = { workspace = true } license = { workspace = true } keywords = ["cql2"] -[features] -default = ["dev-duckdb-bundled"] -dev-duckdb-bundled = ["duckdb/bundled"] # we don't want most folks to have to install DuckDB to test, but we want to avoid bundling on CI - [dependencies] geo = "0.31.0" geo-types = "0.7.17" @@ -48,7 +44,7 @@ sqlparser = { version = "0.58.0", features = ["visitor"] } [dev-dependencies] assert-json-diff = "2" -duckdb = "1.3.2" +duckdb = { version = "1.3.2", features = ["bundled"] } rstest = "0.26.1" [workspace] From 7b6ab33c2b39550f519b02678f84cd102361dcea Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 13:53:07 -0600 Subject: [PATCH 6/8] fix: remove duckdb env --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33e675d..02cba47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - duckdb-version: "1.3.2" - jobs: test: name: Test From e99f4cd3d9a505d7b20d075f30712526b89fdbfd Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 13:53:29 -0600 Subject: [PATCH 7/8] fix: remove more env --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02cba47..479b6eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,6 @@ jobs: test: name: Test runs-on: ubuntu-latest - env: - DUCKDB_LIB_DIR: ${{ github.workspace }}/opt/duckdb - LD_LIBRARY_PATH: ${{ github.workspace }}/opt/duckdb - DYLD_LIBRARY_PATH: ${{ github.workspace }}/opt/duckdb steps: - uses: actions/checkout@v5 - uses: Swatinem/rust-cache@v2 From 250a51b4f773e829e633fc54fe2a585ff98cf655 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 31 Oct 2025 14:09:24 -0600 Subject: [PATCH 8/8] fix: split clippy and test --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 479b6eb..3b91a68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,16 @@ jobs: run: cargo fmt --check - name: Check run: cargo check --workspace - - name: Clippy - run: cargo clippy --workspace --tests -- -D warnings - name: Test run: cargo test + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: Swatinem/rust-cache@v2 + - name: Clippy + run: cargo clippy --workspace --tests -- -D warnings test-python: name: Test Python runs-on: ubuntu-latest