-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New way to get openai api key (tests included) (#41)
* First draft with tests * Fix formating in config.lua * Add gh actions, fix tests, minor changes * Test badge * Fix badges * Change badge to main branch of Bryley repo * Comment out api-key.get function from custom config
- Loading branch information
Showing
15 changed files
with
424 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: CI | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
# os: [ubuntu-latest, windows-latest] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Neovim | ||
shell: bash | ||
run: | | ||
mkdir -p /tmp/nvim | ||
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage | ||
cd /tmp/nvim | ||
chmod a+x ./nvim.appimage | ||
./nvim.appimage --appimage-extract | ||
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH | ||
- name: Run Tests | ||
run: | | ||
nvim --version | ||
[ ! -d tests ] && exit 0 | ||
nvim --headless -u tests/init.lua -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/init.lua', sequential = true}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.tests |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- Logger module for NeoAI | ||
-- @module neoai.logger | ||
|
||
local M = {} | ||
|
||
M.deprecation = function(what, instead) | ||
vim.notify(what .. " is deprecated, use " .. instead, vim.log.levels.WARN, { | ||
title = "NeoAI", | ||
}) | ||
end | ||
|
||
M.debug = function(message) | ||
vim.notify(message, vim.log.levels.DEBUG, { | ||
title = "NeoAI", | ||
}) | ||
end | ||
|
||
M.info = function(message) | ||
vim.notify(message, vim.log.levels.INFO, { | ||
title = "NeoAI", | ||
}) | ||
end | ||
|
||
M.warning = function(message) | ||
vim.notify(message, vim.log.levels.WARN, { | ||
title = "NeoAI", | ||
}) | ||
end | ||
|
||
M.error = function(message) | ||
vim.notify(message, vim.log.levels.ERROR, { | ||
title = "NeoAI", | ||
}) | ||
end | ||
|
||
return M |
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
Oops, something went wrong.