From 248d47a21455b800caab063a732463acfddfe4a9 Mon Sep 17 00:00:00 2001 From: TimelordUK Date: Tue, 1 Sep 2026 20:30:01 +0100 Subject: [PATCH] ci: give the examples job the test data it needs Four examples were reported as smoke failures in CI while passing locally: file_cte, cte_demo, expansion_transformers and mathematical_series. All four load a data file that exists in a developer's working tree but never in a fresh checkout, because .gitignore's blanket `test_*.csv` rule covers it. file_cte: Query 1 failed: File not found: data/test_simple_strings.csv Two fixes, one per cause: - data/test_simple_{math,strings}.csv are generated by scripts/generate_simple_test.py. The Python Tests job already runs that script; the Examples job never did. Add the same step there. - data/test_dummy.csv is a hand-written three-row fixture that no script generates, so generating it is not an option - it has to ship. Un-ignore and commit it. Note this was never gating the build: test_examples.py exits non-zero only for FORMAL failures (those with an examples/expectations/*.json), so these were noise in an otherwise green job. The remaining 18 smoke failures reproduce locally too - 6 need a live HTTP endpoint, 12 are genuine engine or example bugs - and are left alone here. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/test-complete.yml | 9 +++++++++ .gitignore | 3 +++ data/test_dummy.csv | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 data/test_dummy.csv diff --git a/.github/workflows/test-complete.yml b/.github/workflows/test-complete.yml index 45e2fe50..1d3b5ded 100644 --- a/.github/workflows/test-complete.yml +++ b/.github/workflows/test-complete.yml @@ -177,6 +177,15 @@ jobs: - name: Build SQL CLI run: cargo build --release + # data/test_simple_*.csv are generated, not committed (.gitignore's + # `test_*.csv` rule covers them), so several examples that pass locally + # fail here without this. Mirrors the same step in the Python Tests job. + - name: Generate test data + run: | + if [ ! -f "data/test_simple_math.csv" ] || [ ! -f "data/test_simple_strings.csv" ]; then + uv run python scripts/generate_simple_test.py + fi + - name: Run examples test suite run: | uv run python tests/integration/test_examples.py diff --git a/.gitignore b/.gitignore index a9267e0d..e6ad7d89 100644 --- a/.gitignore +++ b/.gitignore @@ -111,6 +111,9 @@ trades_*.json trades_*.csv test_shift_g.rs test_*.csv +# ...but this one is a hand-written fixture used by examples/, not +# generated output, so it has to ship with the repo (see CI examples job). +!data/test_dummy.csv test_state_comparison test_results.txt tests/__pycache__/ diff --git a/data/test_dummy.csv b/data/test_dummy.csv new file mode 100644 index 00000000..92a2208d --- /dev/null +++ b/data/test_dummy.csv @@ -0,0 +1,3 @@ +id,price,category,status +1,99.99,A,active +2,150.50,B,pending