From 85d31193ae3eb231374f81a52995f4c62a232f92 Mon Sep 17 00:00:00 2001 From: SpookyJumpyBeans <116844292+SpookyJumpyBeans@users.noreply.github.com> Date: Fri, 2 Oct 2026 22:55:10 -0400 Subject: [PATCH] Run the test suite on every push and pull request Nothing ran the tests before a merge, so a regression could land on main unnoticed, which is how the NOT predicate crash sat there after the join reordering change. Two jobs. The full suite runs on Python 3.11, 3.12 and 3.13 on Linux, plus 3.13 on Windows, with the tinydelta extra installed. It imports tinydelta before testing, because test_delta.py uses importorskip and a failed install would otherwise skip eight tests while still reporting green. The second job installs no extras at all, runs the suite and a CLI query, which keeps the README's claim that the CSV path needs nothing beyond the standard library true on every change. Adds a status badge to the README. --- .github/workflows/tests.yml | 62 +++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ac5cf9c --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,62 @@ +name: tests + +on: + push: + branches: [main] + pull_request: + +jobs: + full: + # Everything, including the tinydelta integration. + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.11", "3.12", "3.13"] + include: + - os: windows-latest + python-version: "3.13" + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: pyproject.toml + + - name: Install with the tinydelta extra + run: python -m pip install -e ".[dev,delta]" + + # tests/test_delta.py uses importorskip, so a failed tinydelta install + # would quietly skip eight tests and still report green. Fail loudly. + - name: Require tinydelta + run: python -c "import tinydelta" + + - name: Run tests + run: python -m pytest -q -rs + + no-optional-deps: + # The README promises the CSV path needs nothing beyond the standard + # library. Prove it on every change rather than taking it on trust. + name: No optional dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + cache: pip + cache-dependency-path: pyproject.toml + + - name: Install without extras + run: python -m pip install -e ".[dev]" + + - name: Run tests + run: python -m pytest -q -rs + + - name: Run a query from the command line + run: python -m tinyquery --analyze "SELECT region FROM orders WHERE year = 2024" diff --git a/README.md b/README.md index 677be17..2038ecf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # tinyquery +[![tests](https://github.com/SpookyJumpyBeans/tinyquery/actions/workflows/tests.yml/badge.svg)](https://github.com/SpookyJumpyBeans/tinyquery/actions/workflows/tests.yml) + Single node SQL engine. You write a small subset of SQL, it parses it, builds an iterator plan, and runs it. This is the same shape as Spark/Postgres (parse → plan → operators), on one machine, in memory.