fix(wasm): isolate tree-sitter parsing in worker thread (#965) #2613
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: Codegraph Impact Analysis | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: codegraph-impact-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| impact: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - 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 | |
| - uses: actions/cache@v5 | |
| with: | |
| path: .codegraph/ | |
| key: codegraph-${{ hashFiles('src/**', 'package.json') }} | |
| restore-keys: codegraph- | |
| - name: Build graph | |
| run: node dist/cli.js build || (rm -rf .codegraph && node dist/cli.js build --no-incremental) | |
| - name: Run impact analysis | |
| run: node dist/cli.js diff-impact origin/${{ github.base_ref }} --json -T > impact.json | |
| - name: Save PR number | |
| run: echo "${{ github.event.pull_request.number }}" > pr-number.txt | |
| - name: Upload impact artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codegraph-impact | |
| path: | | |
| impact.json | |
| pr-number.txt | |
| retention-days: 1 |