fix dap go to frame buffer choose #2
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: | |
| jobs: | |
| # ── 7.1+7.2+7.4: Scope-aware static checks (Lua-based; replaces 4 shell-grep jobs) ── | |
| # Covers: | |
| # - dap-isolation: no `dap.listeners` / `dap.session` outside session/ | |
| # - event-data: no `<param>.data` reads inside subscribe handler bodies | |
| # where <param> is the event-parameter name | |
| # - blocking-handler: no `vim.fn.system{list}` / `io.read|popen` / | |
| # `vim.wait(>0)` inline inside a subscribe handler body | |
| # See scripts/lint.lua and design D3 (deep call-graph analysis intentionally | |
| # out of scope — these rules catch inline violations only). | |
| lint: | |
| name: "Lint: static checks (scripts/lint.lua)" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Neovim (for `nvim -l` lua runner) | |
| uses: rhysd/action-setup-vim@v1 | |
| with: | |
| neovim: true | |
| version: v0.10.0 | |
| - name: Run lint | |
| run: nvim -l scripts/lint.lua lua | |
| # ── 7.3: Unit tests under plenary ───────────────────────────────────────── | |
| unit-tests: | |
| name: "Unit tests (plenary)" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Neovim | |
| uses: rhysd/action-setup-vim@v1 | |
| with: | |
| neovim: true | |
| version: v0.10.0 | |
| - name: Install plenary.nvim | |
| run: | | |
| mkdir -p ~/.local/share/nvim/lazy | |
| git clone --depth 1 https://github.com/nvim-lua/plenary.nvim \ | |
| ~/.local/share/nvim/lazy/plenary.nvim | |
| - name: Install nvim-dap | |
| run: | | |
| git clone --depth 1 https://github.com/mfussenegger/nvim-dap \ | |
| ~/.local/share/nvim/lazy/nvim-dap | |
| - name: Run unit tests | |
| run: | | |
| nvim --headless \ | |
| -u tests/minimal_init.lua \ | |
| -c "lua require('plenary.test_harness').test_directory('tests/session/', { minimal_init = 'tests/minimal_init.lua', sequential = true })" \ | |
| -c "qa!" | |
| # ── 7.5: Smoke test (vscode-js-debug) ───────────────────────────────────── | |
| smoke-test: | |
| name: "Smoke test (vscode-js-debug)" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Neovim | |
| uses: rhysd/action-setup-vim@v1 | |
| with: | |
| neovim: true | |
| version: v0.10.0 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install plenary.nvim | |
| run: | | |
| mkdir -p ~/.local/share/nvim/lazy | |
| git clone --depth 1 https://github.com/nvim-lua/plenary.nvim \ | |
| ~/.local/share/nvim/lazy/plenary.nvim | |
| - name: Install nvim-dap | |
| run: | | |
| git clone --depth 1 https://github.com/mfussenegger/nvim-dap \ | |
| ~/.local/share/nvim/lazy/nvim-dap | |
| - name: Install vscode-js-debug | |
| run: | | |
| npm install -g @vscode/js-debug | |
| # Locate the installed extension path. | |
| JS_DEBUG_PATH=$(node -e "require.resolve('@vscode/js-debug/src/dapDebugServer')" 2>/dev/null | sed 's|/src/dapDebugServer.*||' || true) | |
| if [ -z "$JS_DEBUG_PATH" ]; then | |
| JS_DEBUG_PATH=$(npm root -g)/@vscode/js-debug | |
| fi | |
| echo "VSCODEJSDEBUG=${JS_DEBUG_PATH}" >> "$GITHUB_ENV" | |
| echo "vscode-js-debug path: ${JS_DEBUG_PATH}" | |
| - name: Run smoke test | |
| env: | |
| CI: "true" | |
| run: | | |
| nvim --headless \ | |
| -u tests/minimal_init.lua \ | |
| -c "lua require('plenary.test_harness').test_directory('tests/session/', { minimal_init = 'tests/minimal_init.lua', sequential = true, pattern = 'smoke_spec' })" \ | |
| -c "qa!" |