cql2 0.5.4

Parse, validate, and convert Common Query Language (CQL2) text and JSON
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      # We've run out of disk space while building libduckdb-sys, so this gives
      # us more headroom in a quite hackey way.
      - name: Free Disk Space
        run: |
          sudo rm -rf /usr/share/dotnet
          sudo rm -rf /usr/local/lib/android
          sudo rm -rf /opt/ghc
          sudo rm -rf /opt/hostedtoolcache/CodeQL
          df -h
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
      - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
      - name: Format
        run: cargo fmt --check
      - name: Check
        run: cargo check --workspace
      - name: Test
        run: cargo test
  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
      - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
      - name: Clippy
        run: cargo clippy --workspace --tests -- -D warnings
  test-python:
    name: Test Python
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
      - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
      - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
        with:
          python-version: ${{ matrix.python-version }}
      - name: Lint
        run: |
          uv run mypy python
          uv run ruff check
          uv run ruff format --check
      - name: Test
        run: uv run pytest
      - name: CLI smoke test
        run: uv run cql2 < examples/text/example01.txt
  wasm-nodejs:
    name: WASM (Node.js)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
      - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
      - name: Install wasm-pack
        run: cargo install wasm-pack
      - name: Build for Node.js
        run: wasm-pack build --target nodejs wasm
      - name: Test (Rust unit tests in Node.js)
        run: wasm-pack test --node wasm
      - name: Setup Node.js
        uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
        with:
          node-version: "20"
      - name: Test (JavaScript integration tests)
        run: npm --prefix wasm test
  wasm-web:
    name: WASM (web)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
      - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
      - name: Install wasm-pack
        run: cargo install wasm-pack
      - name: Build for web
        run: wasm-pack build --target web wasm
      - name: Setup Node.js
        uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
        with:
          node-version: "20"
      - name: Test (JavaScript integration tests with web target)
        run: npm --prefix wasm test
      - name: Test (Rust unit tests in web)
        run: wasm-pack test --headless --firefox wasm