refactor: adapt to nvim 0.11.x deprecating vim.fn.termopen()
#1432
This file contains 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: Run tests | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
neovim_version: ["nightly", "stable"] | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- name: Set up dependencies | |
run: | | |
# ripgrep is a dependency of telescope and fzf-lua | |
sudo apt-get install ripgrep | |
rg --version | |
# fd is a dependency of telescope and fzf-lua | |
# https://github.com/sharkdp/fd?tab=readme-ov-file#on-ubuntu | |
# make sure it's available as `fd` - there seems to be some conflict in Ubuntu | |
sudo apt-get install fd-find | |
sudo ln -s $(which fdfind) /usr/local/bin/fd | |
fd --version | |
# install fzf | |
sudo apt install fzf | |
fzf --version | |
# realpath is used to resolve relative paths in yazi.nvim | |
which realpath || { | |
# just fail with an error message if realpath is not found | |
echo "realpath is not installed, but it should be part of GNU coreutils and included in Ubuntu" | |
exit 1 | |
} | |
- name: Compile and install `yazi-fm` from source | |
uses: baptiste0928/cargo-install@v3.2.0 | |
with: | |
# yazi-fm is the `yazi` executable | |
crate: yazi-fm | |
git: https://github.com/sxyazi/yazi | |
tag: v0.4.2 | |
# commit: | |
# # https://github.com/sxyazi/yazi/commit/d72f90356b98 | |
# d72f90356b98 | |
- name: Compile and install yazi from source | |
uses: baptiste0928/cargo-install@v3.2.0 | |
with: | |
# yazi-cli is the `ya` command line interface | |
crate: yazi-cli | |
git: https://github.com/sxyazi/yazi | |
tag: v0.4.2 | |
# commit: | |
# # https://github.com/sxyazi/yazi/commit/d72f90356b98 | |
# d72f90356b98 | |
- name: Run tests | |
uses: nvim-neorocks/nvim-busted-action@v1.1.0 | |
with: | |
nvim_version: ${{ matrix.neovim_version }} | |
luarocks_version: "3.11.1" | |
- uses: pnpm/action-setup@v4.0.0 | |
- uses: actions/setup-node@v4.1.0 | |
with: | |
node-version-file: .nvmrc | |
cache: "pnpm" | |
- run: pnpm install | |
- name: Preinstall neovim plugins | |
run: pnpm tui neovim exec "Lazy! sync" | |
working-directory: integration-tests | |
# need to work around https://github.com/cypress-io/github-action/issues/1246 | |
- run: pnpm --filter integration-tests exec cypress install | |
- name: Cypress test | |
uses: cypress-io/github-action@v6 | |
with: | |
install: false | |
command: pnpm cy:run | |
- uses: actions/upload-artifact@v4.5.0 | |
# add the line below to store screenshots only on failures | |
# if: failure() | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: integration-tests/cypress/screenshots | |
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn` |