Skip to content

Search across multiple files with ripgrep #146

Search across multiple files with ripgrep

Search across multiple files with ripgrep #146

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
unit_tests:
name: unit tests
runs-on: ubuntu-latest
strategy:
matrix:
nvim: [nightly]
env:
RIPGREP_VERSION: "14.1.0"
VIM: ~/.local/share/nvim/share/nvim/runtime
steps:
- uses: actions/checkout@v3
- name: Add PATH
run: |
echo "$HOME/.local/share/nvim/bin" >> $GITHUB_PATH
echo "$HOME/.local/share/ripgrep" >> $GITHUB_PATH
- name: Cache Dependencies
id: cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-nvim-${{ matrix.nvim }}-rg-${{ env.RIPGREP_VERSION }}
path: |
~/.local/share/nvim
~/.local/share/ripgrep
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.local/share/{nvim,ripgrep}
curl -sL "https://github.com/BurntSushi/ripgrep/releases/download/$RIPGREP_VERSION/ripgrep-$RIPGREP_VERSION-x86_64-unknown-linux-musl.tar.gz" | tar xzf - --strip-components=1 -C ~/.local/share/ripgrep
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.nvim }}/nvim-linux64.tar.gz" | tar xzf - --strip-components=1 -C ~/.local/share/nvim/
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter.git ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
ln -s $PWD ~/.local/share/nvim/site/pack/vendor/start
nvim --headless '+TSInstallSync python javascript html lua rust go' +q
- name: Run tests
run: |
nvim --version | head -1 && rg --version | head -1
nvim --headless '+PlenaryBustedDirectory tests/'