Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github action to install plugin with lazy #22

Merged
merged 22 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/lazy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Lazy

on: [push, pull_request]

jobs:
tests:
name: unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
rev: nightly/nvim-linux64.tar.gz
- os: ubuntu-latest
rev: v0.9.0/nvim-linux64.tar.gz
steps:
- uses: actions/checkout@v3
- run: date +%F > todays-date
- name: Restore from todays cache
uses: actions/cache@v3
with:
path: _neovim
key: ${{ runner.os }}-${{ matrix.rev }}-${{ hashFiles('todays-date') }}

- name: Install neovim
run: |
test -d _neovim || {
mkdir -p _neovim
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}

- name: Install Lazy.nvim
run: |
mkdir -p ~/.config/nvim
cat > ~/.config/nvim/init.lua <<EOF
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({{
dir = "./",
name = "unclutter.nvim",
config = function()
require("unclutter").setup{}
end,
}})
EOF

- name: Run Neovim Headless
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --headless -c 'qa' 2>> error.log
test -z $(cat error.log) || { cat error.log; exit 1; }
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ jobs:
include:
- os: ubuntu-latest
rev: nightly/nvim-linux64.tar.gz
manager: sudo apt-get
# packages: -y ripgrep
- os: ubuntu-latest
rev: v0.9.0/nvim-linux64.tar.gz
manager: sudo apt-get
# packages: -y ripgrep
steps:
- uses: actions/checkout@v3
- run: date +%F > todays-date
Expand All @@ -29,8 +25,6 @@ jobs:

- name: Prepare
run: |
${{ matrix.manager }} update
# ${{ matrix.manager }} install ${{ matrix.packages }}
test -d _neovim || {
mkdir -p _neovim
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
Expand Down
Loading