Merge branch 'fix/502-denorm-optional-aggregate-family' #1053
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: 1.92.0 | |
| components: rustfmt, clippy | |
| - name: Code format check | |
| run: cargo fmt --all -- --check | |
| - name: Lint | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run unit tests | |
| run: cargo test --verbose | |
| - name: Start ClickHouse test infrastructure | |
| run: docker compose -f docker-compose.test.yaml up -d | |
| - name: Wait for ClickHouse to be ready | |
| run: | | |
| for i in {1..30}; do | |
| if curl -s http://localhost:8123/ping > /dev/null; then | |
| echo "ClickHouse is ready" | |
| exit 0 | |
| fi | |
| echo "Waiting for ClickHouse... ($i/30)" | |
| sleep 2 | |
| done | |
| echo "ClickHouse failed to start" | |
| exit 1 | |
| - name: Setup test data | |
| run: | | |
| chmod +x scripts/test/setup_social_integration_data.sh | |
| scripts/test/setup_social_integration_data.sh | |
| # Schema-variation data for the smoke subset (P0.7): these back the | |
| # fk_edge/polymorphic/composite_id/denormalized_flights schemas in | |
| # schemas/test/unified_test_multi_schema.yaml (db_fk_edge, db_polymorphic, | |
| # db_composite_id, db_denormalized). Not needed by the 2 regression | |
| # tests above, but required for `pytest -m smoke`. | |
| chmod +x scripts/setup/setup_fk_edge_data.sh scripts/setup/setup_polymorphic_data.sh scripts/setup/setup_composite_id_data.sh scripts/setup/setup_denormalized_data.sh | |
| scripts/setup/setup_fk_edge_data.sh | |
| scripts/setup/setup_polymorphic_data.sh | |
| scripts/setup/setup_composite_id_data.sh | |
| scripts/setup/setup_denormalized_data.sh | |
| - name: Start ClickGraph server | |
| run: | | |
| export CLICKHOUSE_URL="http://localhost:8123" | |
| export CLICKHOUSE_USER="test_user" | |
| export CLICKHOUSE_PASSWORD="test_pass" | |
| export CLICKHOUSE_DATABASE="test_integration" | |
| export GRAPH_CONFIG_PATH="./schemas/test/unified_test_multi_schema.yaml" | |
| ./target/debug/clickgraph --http-port 7475 --bolt-port 7687 > server.log 2>&1 & | |
| # Wait for server to be fully ready (health + query execution) | |
| for i in {1..30}; do | |
| if curl -s http://localhost:7475/health > /dev/null; then | |
| if curl -s -X POST http://localhost:7475/query \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"query":"RETURN 1"}' > /dev/null; then | |
| echo "ClickGraph server is fully ready" | |
| exit 0 | |
| fi | |
| fi | |
| echo "Waiting for ClickGraph... ($i/30)" | |
| sleep 2 | |
| done | |
| echo "ClickGraph server failed to start" | |
| cat server.log | |
| exit 1 | |
| - name: Install Python test dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip3 install pytest requests clickhouse-connect | |
| - name: Run critical regression tests | |
| run: | | |
| pytest tests/integration/test_return_only_regression.py -v | |
| pytest tests/integration/test_optional_match_where_regression.py -v | |
| - name: Run per-variation smoke subset | |
| run: | | |
| # Explicit file list (not `pytest tests/integration -m smoke`): several | |
| # unrelated files under tests/integration/ fail to COLLECT without | |
| # extra deps this job doesn't install (neo4j, numpy, clickhouse_driver), | |
| # which would abort the whole run before marker filtering ever applies. | |
| pytest \ | |
| tests/integration/test_basic_queries.py \ | |
| tests/integration/test_optional_match.py \ | |
| tests/integration/test_with_cte_node_expansion.py \ | |
| tests/integration/test_variable_length_paths.py \ | |
| tests/integration/test_graphrag_schema_variations.py \ | |
| tests/integration/test_smoke_schema_variations.py \ | |
| -m smoke -v | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| pkill -f clickgraph || true | |
| docker compose -f docker-compose.test.yaml down |