Skip to content

fix(react): deduplicate filters for multi-occurrence table nodes #11

fix(react): deduplicate filters for multi-occurrence table nodes

fix(react): deduplicate filters for multi-occurrence table nodes #11

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
rust-test:
name: Rust Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95.0
with:
targets: wasm32-unknown-unknown
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Rust tests
run: cargo test --workspace --locked
- name: Run Clippy
run: cargo clippy --workspace --locked -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check
- name: Verify API schema snapshot
run: cargo test -p flowscope-core --test schema_guard --locked
cli-fix-perf:
name: CLI Fix Perf Gate
runs-on: ubuntu-latest
env:
CLI_FIX_PERF_BUDGET_MS: 5000
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95.0
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-cli-fix-perf-${{ hashFiles('**/Cargo.lock') }}
- name: Build CLI release binary
run: cargo build -p flowscope-cli --release --locked
- name: Benchmark CLI fix batch performance
run: |
python3 scripts/sql-corpus-fix-benchmark.py \
--sql-dir crates/flowscope-core/tests/fixtures/postgres \
--dialect postgres \
--mode batch \
--json-output /tmp/fs_cli_fix_perf.json
- name: Enforce perf budget
run: |
python3 - <<'PY'
import json
import pathlib
import os
report = pathlib.Path('/tmp/fs_cli_fix_perf.json')
payload = json.loads(report.read_text())
elapsed_ms = float(payload['result']['elapsed_ms'])
budget_ms = float(os.environ['CLI_FIX_PERF_BUDGET_MS'])
print(f'CLI fix batch elapsed={elapsed_ms:.3f}ms (budget={budget_ms:.1f}ms)')
summary = pathlib.Path('/tmp/fs_cli_fix_perf_summary.txt')
summary.write_text(
f'elapsed_ms={elapsed_ms:.3f}\n'
f'budget_ms={budget_ms:.1f}\n'
f'sql_dir={payload["sql_dir"]}\n'
)
if elapsed_ms > budget_ms:
raise SystemExit(
f'CLI fix performance regression: elapsed {elapsed_ms:.3f}ms exceeds budget {budget_ms:.1f}ms'
)
PY
- name: Upload perf telemetry
if: always()
uses: actions/upload-artifact@v4
with:
name: cli-fix-perf
path: |
/tmp/fs_cli_fix_perf.json
/tmp/fs_cli_fix_perf_summary.txt
wasm-build:
name: WASM Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95.0
with:
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }}
- name: Build WASM
run: wasm-pack build crates/flowscope-wasm --target web --out-dir ../../packages/core/wasm
- name: Upload WASM artifact
uses: actions/upload-artifact@v4
with:
name: wasm-module
path: packages/core/wasm/
typescript-build:
name: TypeScript Build
runs-on: ubuntu-latest
needs: wasm-build
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Download WASM artifact
uses: actions/download-artifact@v4
with:
name: wasm-module
path: packages/core/wasm/
- name: Install dependencies
run: yarn install
- name: Build core package (skip WASM rebuild)
run: yarn workspace @pondpilot/flowscope-core build:no-wasm
- name: Build demo app
run: yarn workspace @pondpilot/flowscope-app build
schema-compat:
name: Schema Compatibility (Rust ↔ TS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install JS deps
run: cd packages/core && yarn install --frozen-lockfile
- name: Verify schema snapshots
run: |
cargo test -p flowscope-core --test schema_guard --locked
cd packages/core && yarn test schema-compat.test.ts --silent
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Run ESLint
run: yarn lint || true
- name: Run Prettier check
run: yarn prettier --check . || true
cli-serve:
name: CLI Serve Mode
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-serve-${{ hashFiles('**/Cargo.lock') }}
- name: Install JS dependencies
run: yarn install
- name: Build app for embedding
run: cd app && yarn build
- name: Sync app dist into CLI embed directory
run: |
rm -rf crates/flowscope-cli/embedded-app
mkdir -p crates/flowscope-cli/embedded-app
cp -R app/dist/. crates/flowscope-cli/embedded-app/
- name: Build CLI with serve feature
run: cargo build -p flowscope-cli --features serve --release
- name: Run CLI serve tests
run: cargo test -p flowscope-cli --features serve
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95.0
with:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
- name: Generate coverage
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}