Treesitter main #1519
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, pull_request] | |
| jobs: | |
| unit_tests: | |
| name: unit tests | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.tar.gz | |
| manager: sudo snap | |
| packages: go | |
| - os: ubuntu-latest | |
| url: https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz | |
| manager: sudo snap | |
| packages: go | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "^1.24" # The Go version to download (if necessary) and use. | |
| - run: date +%F > todays-date | |
| - name: Restore cache for today's nightly. | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| _neovim | |
| key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }} | |
| - name: Prepare | |
| run: | | |
| ${{ matrix.manager }} install --classic ${{ matrix.packages }} | |
| test -d _neovim || { | |
| mkdir -p _neovim | |
| curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim" | |
| } | |
| GO111MODULE=on go install golang.org/x/tools/gopls@latest | |
| GO111MODULE=on go install mvdan.cc/gofumpt@latest | |
| go install golang.org/x/tools/cmd/goimports@latest | |
| go install github.com/fatih/gomodifytags@latest | |
| go install github.com/josharian/impl@latest | |
| go install github.com/segmentio/golines@latest | |
| mkdir -p ~/.local/share/nvim/site/pack/vendor/start | |
| git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim | |
| git clone --depth 1 https://github.com/neovim/nvim-lspconfig ~/.local/share/nvim/site/pack/vendor/start/nvim-lspconfig | |
| git clone --depth 1 -b main https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter | |
| git clone --depth 1 https://github.com/ray-x/guihua.lua ~/.local/share/nvim/site/pack/vendor/start/guihua.lua | |
| ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start | |
| - name: Compile parsers | |
| run: | | |
| export PATH="${PWD}/_neovim/bin:${PATH}" | |
| nvim -l lua/tests/install-parsers.lua --max-jobs=2 | |
| - name: Run tests | |
| run: | | |
| export PATH="${PWD}/_neovim/bin:${PATH}" | |
| nvim --headless -u lua/tests/minimal.lua -i NONE -c "TSInstall go" -c "q" | |
| make test |