feat(cli): add query dry-run mode #58
Workflow file for this run
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: SDK DSL Parity | |
| on: | |
| pull_request: | |
| branches: [main, dev] | |
| paths: | |
| - 'helix-cli/**' | |
| - 'metrics/**' | |
| - 'sdks/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/parity_tests.yml' | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - 'helix-cli/**' | |
| - 'metrics/**' | |
| - 'sdks/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/parity_tests.yml' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| HELIX_NO_UPDATE_CHECK: "1" | |
| HELIX_DISABLE_UPDATE_CHECK: "1" | |
| NO_COLOR: "1" | |
| jobs: | |
| sdk-unit-tests: | |
| name: SDK Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # --- Rust SDK (helix-db crate) --- | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') || 'fallback' }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Test Rust SDK | |
| run: cargo test -p helix-db | |
| # --- TypeScript SDK --- | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: sdks/typescript/package-lock.json | |
| - name: Install npm deps | |
| working-directory: sdks/typescript | |
| run: npm ci | |
| - name: Test TypeScript SDK | |
| working-directory: sdks/typescript | |
| run: npm test | |
| # --- Python SDK --- | |
| # The Python parity tests compare against the TypeScript-generated | |
| # fixtures (sdks/tests/parity/generated/typescript), which are gitignored | |
| # and produced at build time — generate them first. | |
| - name: Generate TypeScript parity fixtures | |
| working-directory: sdks/typescript | |
| run: npm run parity:generate:ts | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Test Python SDK | |
| working-directory: sdks/python | |
| env: | |
| PYTHONPATH: src | |
| run: python -m unittest discover -s tests -v | |
| parity: | |
| runs-on: ubuntu-latest # Docker daemon preinstalled; required for the runtime phase | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| working-directory: sdks/typescript | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # --- Rust (generate Rust fixtures) --- | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') || 'fallback' }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| # --- Node (all phases) --- | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: sdks/typescript/package-lock.json | |
| # --- Go (generate Go fixtures) --- | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| cache-dependency-path: sdks/go/go.mod | |
| # --- helix CLI (this checkout) --- | |
| - name: Build helix CLI from this checkout | |
| working-directory: . | |
| run: | | |
| cargo build -p helix-cli | |
| echo "$PWD/target/debug" >> "$GITHUB_PATH" | |
| - name: Verify toolchain | |
| run: | | |
| helix --version | |
| docker --version | |
| - name: Install npm deps | |
| run: npm ci | |
| - name: Check Go formatting | |
| working-directory: sdks/go | |
| run: test -z "$(gofmt -l .)" | |
| - name: Test Go SDK | |
| working-directory: sdks/go | |
| run: go test ./... | |
| - name: Run parity suite | |
| run: npm run test:parity | |
| - name: Upload parity artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: parity-output | |
| path: | | |
| sdks/tests/parity/generated/** | |
| sdks/tests/parity/results/** | |
| if-no-files-found: ignore |