perf: native engine optimizations — eliminate deep-clone, batch SQLite, skip AST, cache FS #798
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Lint | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| for attempt in 1 2 3; do | |
| npm install && break | |
| if [ "$attempt" -lt 3 ]; then | |
| echo "::warning::npm install attempt $attempt failed, retrying in 15s..." | |
| sleep 15 | |
| else | |
| echo "::error::npm install failed after 3 attempts" | |
| exit 1 | |
| fi | |
| done | |
| - name: Run Biome | |
| run: npx @biomejs/biome check src/ tests/ | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node-version: [20, 22] | |
| runs-on: ${{ matrix.os }} | |
| name: Test Node ${{ matrix.node-version }} (${{ matrix.os }}) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| for attempt in 1 2 3; do | |
| npm install && break | |
| if [ "$attempt" -lt 3 ]; then | |
| echo "::warning::npm install attempt $attempt failed, retrying in 15s..." | |
| sleep 15 | |
| else | |
| echo "::error::npm install failed after 3 attempts" | |
| exit 1 | |
| fi | |
| done | |
| - name: Run tests | |
| run: npm test | |
| rust-check: | |
| runs-on: ubuntu-latest | |
| name: Rust compile check | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: crates/codegraph-core | |
| - name: Check compilation | |
| run: cargo check --workspace | |
| ci-pipeline: | |
| if: always() | |
| needs: [lint, test, rust-check] | |
| runs-on: ubuntu-latest | |
| name: CI Testing Pipeline | |
| steps: | |
| - name: Check results | |
| run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | |
| echo "One or more CI jobs failed or were cancelled." | |
| exit 1 | |
| fi |