From 8b2a127090b048704ed8a02faf9323a992923d29 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Thu, 25 Jan 2024 21:00:31 +0100 Subject: [PATCH 01/22] github action to install plugin with lazy --- .github/workflows/lazy.yml | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/lazy.yml diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml new file mode 100644 index 0000000..56b3aa3 --- /dev/null +++ b/.github/workflows/lazy.yml @@ -0,0 +1,50 @@ +name: Tests + +on: [push, pull_request] + +jobs: + tests: + name: lazy test + 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 + - name: Restore from todays cache + uses: actions/cache@v3 + with: + path: _neovim + key: ${{ runner.os }}-${{ matrix.rev }}-${{ hashFiles('todays-date') }} + + - 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" + } + echo "Downloading lazy.nvim config" + mkdir -p ~/.config/nvim/lua/config" + curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua + mkdir -p ~/.config/nvim/lua/config/plugins" + curl -sL "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/config/plugins/unclutter.lua + + - name: Run tests + run: | + export PATH="${PWD}/_neovim/bin:${PATH}" + export VIM="${PWD}/_neovim/share/nvim/runtime" + nvim --headless +qa + nvim --headless "+Lazy! install" +qa + nvim --headless +qa From 8fa5cfd6e2ba0c3f16ba788adb6ca2bf3d6d25d9 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Thu, 25 Jan 2024 21:02:01 +0100 Subject: [PATCH 02/22] typo --- .github/workflows/lazy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 56b3aa3..1252bf9 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -36,7 +36,7 @@ jobs: curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/_neovim" } echo "Downloading lazy.nvim config" - mkdir -p ~/.config/nvim/lua/config" + mkdir -p ~/.config/nvim/lua/config curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua mkdir -p ~/.config/nvim/lua/config/plugins" curl -sL "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/config/plugins/unclutter.lua From 5f778bca2674a289be35b165ad0e4c79ffa14c00 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Thu, 25 Jan 2024 21:02:48 +0100 Subject: [PATCH 03/22] typo2 --- .github/workflows/lazy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 1252bf9..6a0d727 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -38,7 +38,7 @@ jobs: echo "Downloading lazy.nvim config" mkdir -p ~/.config/nvim/lua/config curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua - mkdir -p ~/.config/nvim/lua/config/plugins" + mkdir -p ~/.config/nvim/lua/config/plugins curl -sL "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/config/plugins/unclutter.lua - name: Run tests From d69b7d8e187f2d8a0f71db5d25cec4d10c3cb2e5 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Thu, 25 Jan 2024 21:04:38 +0100 Subject: [PATCH 04/22] make it fail --- .github/workflows/lazy.yml | 1 + lua/unclutter/init.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 6a0d727..4199b8b 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -38,6 +38,7 @@ jobs: echo "Downloading lazy.nvim config" mkdir -p ~/.config/nvim/lua/config curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua + echo "Downloading pablopunk's unclutter config" mkdir -p ~/.config/nvim/lua/config/plugins curl -sL "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/config/plugins/unclutter.lua diff --git a/lua/unclutter/init.lua b/lua/unclutter/init.lua index 669eca4..1a9257c 100644 --- a/lua/unclutter/init.lua +++ b/lua/unclutter/init.lua @@ -5,7 +5,7 @@ local unclutter = {} --- Setup function (optional) ---@param opts unclutter.config -function unclutter.setup(opts) +function unclutter.setup_foo(opts) plugin.enable(opts) end From 3f8efd395aa40ac5668d6112cc65fbccd3a978b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Jan 2024 20:04:55 +0000 Subject: [PATCH 05/22] docs(build): auto-generate doc --- doc/unclutter.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/unclutter.txt b/doc/unclutter.txt index 5bc6ee8..9ca44fc 100644 --- a/doc/unclutter.txt +++ b/doc/unclutter.txt @@ -3,7 +3,7 @@ unclutter *unclutter* -unclutter.setup({opts}) *unclutter.setup()* +unclutter.setup_foo({opts}) *unclutter.setup_foo()* Setup function (optional) From 0bd44f0b3e2ed33aff21196fb03ef8fbae1cbe07 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Thu, 25 Jan 2024 21:09:19 +0100 Subject: [PATCH 06/22] force error code --- .github/workflows/lazy.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 4199b8b..c3be80e 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -46,6 +46,12 @@ jobs: run: | export PATH="${PWD}/_neovim/bin:${PATH}" export VIM="${PWD}/_neovim/share/nvim/runtime" - nvim --headless +qa - nvim --headless "+Lazy! install" +qa - nvim --headless +qa + touch error.log + nvim --headless +qa 2>error.log + nvim --headless "+Lazy! install" +qa 2>error.log + nvim --headless +qa 2>error.log + [[ -z $(cat error.log) ]] || { + echo "Error log:" + cat error.log + exit 1 + } From bc9092c4e05a70892a567df91788dd01ab2d864f Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Thu, 25 Jan 2024 21:11:57 +0100 Subject: [PATCH 07/22] force error code again --- .github/workflows/lazy.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index c3be80e..b7068cc 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -50,8 +50,5 @@ jobs: nvim --headless +qa 2>error.log nvim --headless "+Lazy! install" +qa 2>error.log nvim --headless +qa 2>error.log - [[ -z $(cat error.log) ]] || { - echo "Error log:" - cat error.log - exit 1 - } + cat error.log + [[ -z $(cat error.log) ]] From 208973a1d279196d9676248df8ad078cf8844b58 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 00:46:59 +0100 Subject: [PATCH 08/22] exit 1 --- .github/workflows/lazy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index b7068cc..d0da2f6 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -51,4 +51,4 @@ jobs: nvim --headless "+Lazy! install" +qa 2>error.log nvim --headless +qa 2>error.log cat error.log - [[ -z $(cat error.log) ]] + [[ -z $(cat error.log) ]] || exit 1 From f4c12ce354cc9436cd16dfc51cce8af6d9ddb7a9 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 00:48:16 +0100 Subject: [PATCH 09/22] concat --- .github/workflows/lazy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index d0da2f6..e454bdd 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -47,8 +47,8 @@ jobs: export PATH="${PWD}/_neovim/bin:${PATH}" export VIM="${PWD}/_neovim/share/nvim/runtime" touch error.log - nvim --headless +qa 2>error.log - nvim --headless "+Lazy! install" +qa 2>error.log - nvim --headless +qa 2>error.log + nvim --headless +qa 2>>error.log + nvim --headless "+Lazy! install" +qa 2>>error.log + nvim --headless +qa 2>>error.log cat error.log [[ -z $(cat error.log) ]] || exit 1 From 2f14896f5b6240b1fd1c2ffdea1d442b1af84633 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 00:50:45 +0100 Subject: [PATCH 10/22] install init.lua --- .github/workflows/lazy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index e454bdd..ecc2457 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -37,6 +37,7 @@ jobs: } echo "Downloading lazy.nvim config" mkdir -p ~/.config/nvim/lua/config + curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua echo "Downloading pablopunk's unclutter config" mkdir -p ~/.config/nvim/lua/config/plugins From 71bbfdf20496bf161b61e17c3a4c77fe9edd3027 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 00:53:22 +0100 Subject: [PATCH 11/22] fix path --- .github/workflows/lazy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index ecc2457..f50b295 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -40,7 +40,7 @@ jobs: curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua echo "Downloading pablopunk's unclutter config" - mkdir -p ~/.config/nvim/lua/config/plugins + mkdir -p ~/.config/nvim/lua/plugins curl -sL "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/config/plugins/unclutter.lua - name: Run tests From 3612199bd7d8636bbff3c0347a6838a7856952a0 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 00:54:27 +0100 Subject: [PATCH 12/22] fix output path --- .github/workflows/lazy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index f50b295..0e4936b 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -41,7 +41,7 @@ jobs: curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua echo "Downloading pablopunk's unclutter config" mkdir -p ~/.config/nvim/lua/plugins - curl -sL "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/config/plugins/unclutter.lua + curl -sL "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/plugins/unclutter.lua - name: Run tests run: | From 2ebe9403eb1235e142d3af4f65a3a4487ffe3fb5 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 00:56:09 +0100 Subject: [PATCH 13/22] if --- .github/workflows/lazy.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 0e4936b..8eaa9e4 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -52,4 +52,9 @@ jobs: nvim --headless "+Lazy! install" +qa 2>>error.log nvim --headless +qa 2>>error.log cat error.log - [[ -z $(cat error.log) ]] || exit 1 + if [[ -z $(cat error.log) ]] ; then + echo "Passed." + else + echo "Failed." + exit 1 + fi From a95906d78ec5607086361aadcc067d5505774534 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 00:59:03 +0100 Subject: [PATCH 14/22] try with test --- .github/workflows/lazy.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 8eaa9e4..37ec26f 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -51,10 +51,7 @@ jobs: nvim --headless +qa 2>>error.log nvim --headless "+Lazy! install" +qa 2>>error.log nvim --headless +qa 2>>error.log + echo cat error.log - if [[ -z $(cat error.log) ]] ; then - echo "Passed." - else - echo "Failed." - exit 1 - fi + echo + test -s error.log || exit 1 From fb517d5dd5db4b36a74a8069847839c489dfdd71 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 01:00:46 +0100 Subject: [PATCH 15/22] fix setup --- lua/unclutter/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/unclutter/init.lua b/lua/unclutter/init.lua index 1a9257c..669eca4 100644 --- a/lua/unclutter/init.lua +++ b/lua/unclutter/init.lua @@ -5,7 +5,7 @@ local unclutter = {} --- Setup function (optional) ---@param opts unclutter.config -function unclutter.setup_foo(opts) +function unclutter.setup(opts) plugin.enable(opts) end From 1c706aedc71582c3b3eb269b78a0bdc748d558c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Jan 2024 00:01:01 +0000 Subject: [PATCH 16/22] docs(build): auto-generate doc --- doc/unclutter.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/unclutter.txt b/doc/unclutter.txt index 9ca44fc..5bc6ee8 100644 --- a/doc/unclutter.txt +++ b/doc/unclutter.txt @@ -3,7 +3,7 @@ unclutter *unclutter* -unclutter.setup_foo({opts}) *unclutter.setup_foo()* +unclutter.setup({opts}) *unclutter.setup()* Setup function (optional) From 9b6b86b7e22f94d53f880c734f7b1e07043e1d27 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 01:06:37 +0100 Subject: [PATCH 17/22] lazy update --- .github/workflows/lazy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 37ec26f..7da49fb 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -49,7 +49,7 @@ jobs: export VIM="${PWD}/_neovim/share/nvim/runtime" touch error.log nvim --headless +qa 2>>error.log - nvim --headless "+Lazy! install" +qa 2>>error.log + nvim --headless "+Lazy! install" "+Lazy! update" +qa 2>>error.log nvim --headless +qa 2>>error.log echo cat error.log From b6f9bad2781d311833ffb9d243b16790b3cacfd4 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 01:08:47 +0100 Subject: [PATCH 18/22] oops --- .github/workflows/lazy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 7da49fb..77920f7 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -54,4 +54,5 @@ jobs: echo cat error.log echo - test -s error.log || exit 1 + test -s error.log && exit 1 + From 31d1f4ef49af7537a89d071c13e126367929bc5d Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 01:10:14 +0100 Subject: [PATCH 19/22] cat --- .github/workflows/lazy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 77920f7..4daf7e8 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -35,13 +35,18 @@ jobs: 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://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua + cat ~/.config/nvim/init.lua curl -sL "https://raw.githubusercontent.com/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://raw.githubusercontent.com/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 run: | From 1c51dfa5f0e84191d722497a513133a3bfbe20d2 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 01:14:19 +0100 Subject: [PATCH 20/22] no sL in curl --- .github/workflows/lazy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 4daf7e8..a3afea3 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -38,14 +38,14 @@ jobs: echo echo "Downloading lazy.nvim config" mkdir -p ~/.config/nvim/lua/config - curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua + curl "https://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua cat ~/.config/nvim/init.lua - curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua + curl "https://raw.githubusercontent.com/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://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/plugins/unclutter.lua + curl "https://raw.githubusercontent.com/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 From d8cbf5a3db0a73aaaf227134eb5afd0ea90fcf9d Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Fri, 26 Jan 2024 01:17:46 +0100 Subject: [PATCH 21/22] no error.log --- .github/workflows/lazy.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index a3afea3..846040a 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -38,14 +38,14 @@ jobs: echo echo "Downloading lazy.nvim config" mkdir -p ~/.config/nvim/lua/config - curl "https://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua + curl -sL "https://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua cat ~/.config/nvim/init.lua - curl "https://raw.githubusercontent.com/LazyVim/starter/main/lua/config/lazy.lua" > ~/.config/nvim/lua/config/lazy.lua + curl -sL "https://raw.githubusercontent.com/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 "https://raw.githubusercontent.com/pablopunk/dotfiles/master/nvim/lua/pablopunk/plugins/unclutter.lua" > ~/.config/nvim/lua/plugins/unclutter.lua + curl -sL "https://raw.githubusercontent.com/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 @@ -53,11 +53,11 @@ jobs: export PATH="${PWD}/_neovim/bin:${PATH}" export VIM="${PWD}/_neovim/share/nvim/runtime" touch error.log - nvim --headless +qa 2>>error.log - nvim --headless "+Lazy! install" "+Lazy! update" +qa 2>>error.log - nvim --headless +qa 2>>error.log - echo - cat error.log - echo - test -s error.log && exit 1 + nvim --headless +qa + nvim --headless "+Lazy! install" "+Lazy! update" +qa + nvim --headless +qa + # echo + # cat error.log + # echo + # test -s error.log && exit 1 From 63632ae12bd10f589c30a167eb175a029cf13fe4 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Sat, 3 Feb 2024 12:01:13 +0100 Subject: [PATCH 22/22] finally --- .github/workflows/lazy.yml | 63 +++++++++++++++++++------------------- .github/workflows/test.yml | 6 ---- 2 files changed, 32 insertions(+), 37 deletions(-) diff --git a/.github/workflows/lazy.yml b/.github/workflows/lazy.yml index 846040a..a70276a 100644 --- a/.github/workflows/lazy.yml +++ b/.github/workflows/lazy.yml @@ -1,10 +1,10 @@ -name: Tests +name: Lazy on: [push, pull_request] jobs: tests: - name: lazy test + name: unit tests runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -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 @@ -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://raw.githubusercontent.com/LazyVim/starter/main/init.lua" > ~/.config/nvim/init.lua - cat ~/.config/nvim/init.lua - curl -sL "https://raw.githubusercontent.com/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://raw.githubusercontent.com/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 <> error.log + test -z $(cat error.log) || { cat error.log; exit 1; } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0809ae5..9de09ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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"