More verbose test-docker output, so it doesn't look like it's frozen #729
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: Tests | |
| on: | |
| push: | |
| branches: [ "*" ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Install Neovim | |
| run: sudo snap install nvim --classic | |
| - name: Install Plenary | |
| run: | | |
| mkdir -p $HOME/.local/share/nvim/lazy/ | |
| git clone https://github.com/nvim-lua/plenary.nvim.git | |
| mv plenary.nvim $HOME/.local/share/nvim/lazy/ | |
| - name: Install nvim-treesitter | |
| run: | | |
| mkdir -p $HOME/.local/share/nvim/lazy/ | |
| # TODO specifying 0.10.0 is a workaround - something later than it is | |
| # breaking ts/java comment nodes | |
| git clone --depth 1 --branch v0.10.0 https://github.com/nvim-treesitter/nvim-treesitter.git | |
| mv nvim-treesitter $HOME/.local/share/nvim/lazy/ | |
| # Ensure clean parser directory for consistent builds | |
| rm -rf $HOME/.local/share/nvim/lazy/nvim-treesitter/parser | |
| - name: Run luacheck type check / linter | |
| run: | | |
| sudo apt-get install lua-check -y --no-install-recommends | |
| make check | |
| - name: Check for errant util calls | |
| run: make no-utils | |
| - name: Inspect Parser Environment (Pre-Test) | |
| run: | | |
| echo "=== Neovim Version ===" | |
| nvim --version | head -3 | |
| echo "" | |
| echo "=== System Info ===" | |
| uname -a | |
| gcc --version | head -1 | |
| echo "" | |
| echo "=== nvim-treesitter Git Info ===" | |
| cd $HOME/.local/share/nvim/lazy/nvim-treesitter | |
| git log --oneline -1 | |
| git describe --tags --always | |
| echo "" | |
| echo "=== Parser Directory State (Before Tests) ===" | |
| ls -lah $HOME/.local/share/nvim/lazy/nvim-treesitter/parser/ 2>&1 || echo "Parser directory does not exist yet" | |
| - name: Run Tests | |
| run: make test | |
| - name: Inspect Parser Binaries (Post-Test) | |
| if: always() | |
| run: | | |
| echo "=== Parser Directory State (After Tests) ===" | |
| ls -lah $HOME/.local/share/nvim/lazy/nvim-treesitter/parser/ | |
| echo "" | |
| echo "=== Parser Binary Checksums ===" | |
| cd $HOME/.local/share/nvim/lazy/nvim-treesitter/parser/ | |
| for parser in *.so; do | |
| echo "File: $parser" | |
| ls -lh "$parser" | |
| md5sum "$parser" | |
| file "$parser" | |
| echo "" | |
| done | |
| echo "" | |
| echo "=== TypeScript Algorithm Trace ===" | |
| cd $GITHUB_WORKSPACE | |
| cat > /tmp/trace_ts.lua << 'EOFTRACE' | |
| vim.fn.cursor(121, 3) | |
| local nodes = require("treewalker.nodes") | |
| local strategies = require("treewalker.strategies") | |
| local node = nodes.get_at_row(121) | |
| print("=== Complete algorithm trace ===") | |
| print("1. Input node from get_at_row(121):") | |
| print(" Type:", node:type()) | |
| print(" Scol:", nodes.get_scol(node)) | |
| print("") | |
| local highest = nodes.get_highest_row_coincident(node) | |
| print("2. After get_highest_row_coincident:") | |
| print(" Type:", highest:type()) | |
| print(" Scol:", nodes.get_scol(highest)) | |
| print("") | |
| print("3. Tracing get_first_ancestor_with_diff_scol:") | |
| local original_scol = nodes.get_scol(highest) | |
| print(" original_scol =", original_scol) | |
| local starting = highest | |
| print(" Escape augment targets:") | |
| while starting and nodes.is_augment_target(starting) do | |
| print(" -", starting:type(), "is augment, escaping to parent") | |
| starting = starting:parent() | |
| end | |
| print(" starting_node =", starting and starting:type() or "NIL") | |
| print("") | |
| if starting then | |
| print(" Walking ancestors:") | |
| local iter = starting:parent() | |
| while iter do | |
| print(" -", iter:type(), "scol=" .. nodes.get_scol(iter), "is_jump_target=" .. tostring(nodes.is_jump_target(iter))) | |
| if nodes.is_jump_target(iter) and nodes.get_scol(iter) ~= original_scol then | |
| print(" >> FOUND! Returning", iter:type()) | |
| break | |
| end | |
| iter = iter:parent() | |
| end | |
| end | |
| print("") | |
| print("4. Final result:") | |
| local result = strategies.get_first_ancestor_with_diff_scol(highest) | |
| if result then | |
| print(" Type:", result:type()) | |
| print(" Scol:", nodes.get_scol(result)) | |
| else | |
| print(" NIL") | |
| end | |
| EOFTRACE | |
| nvim --headless -u tests/minimal_init.lua \ | |
| -c "edit tests/fixtures/typescript.ts" \ | |
| -c "lua vim.treesitter.get_parser():parse()" \ | |
| -c "luafile /tmp/trace_ts.lua" \ | |
| -c "quitall" 2>&1 || echo "TypeScript trace failed" | |
| echo "" | |
| echo "=== Dump Java Test Tree Structure ===" | |
| nvim --headless -u tests/minimal_init.lua \ | |
| -c "edit tests/fixtures/java.java" \ | |
| -c "lua vim.treesitter.get_parser():parse()" \ | |
| -c "lua vim.fn.cursor(31, 1)" \ | |
| -c "lua local nodes = require('treewalker.nodes'); local node = nodes.get_highest_node_at_current_row(); print('Node at 31,1 (using get_highest_node_at_current_row):'); print(' Type:', node:type()); print(' Is comment?', nodes.is_comment_node(node)); print(' Is augment target?', nodes.is_augment_target(node)); print(' Srow:', nodes.get_srow(node)); local p = node:parent(); if p then print(' Parent:', p:type()) end" \ | |
| -c "quitall" 2>&1 || echo "Tree dump failed" | |