-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Рефакторинг после переименования репозитория: - мелкие правки - оформил тесты стандартным образом - добавил CI
- Loading branch information
Showing
12 changed files
with
105 additions
and
71 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,21 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
all: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Tarantool | ||
run: | | ||
curl -L https://tarantool.io/eHAFdDf/release/2/installer.sh | bash | ||
sudo apt-get -y install tarantool | ||
- name: Run app tests | ||
run: make test |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
.idea/ | ||
.idea/ | ||
.rocks/ | ||
luacov.*.out |
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,13 @@ | ||
SHELL := /bin/bash | ||
|
||
.rocks: | ||
tarantoolctl rocks install luacheck 0.26.0 \ | ||
&& tarantoolctl rocks install luatest 0.5.7 \ | ||
&& tarantoolctl rocks install luacov 0.13.0 \ | ||
&& tarantoolctl rocks install luacov-reporters 0.1.0 | ||
|
||
.PHONY: test | ||
test: .rocks | ||
.rocks/bin/luacheck lua-debug-helper --max-line-length 200 \ | ||
&& .rocks/bin/luatest -v --coverage \ | ||
&& .rocks/bin/luacov -r summary && cat luacov.report.out |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package = 'ide-debug' | ||
version = '1.0.0-1' | ||
package = 'lua-debug-helper' | ||
version = '1.0.2-1' | ||
source = { | ||
url = 'git+https://github.com/a1div0/ide-debug.git', | ||
url = 'git+https://github.com/a1div0/lua-debug-helper.git', | ||
branch = 'main', | ||
tag = '1.0.0', | ||
tag = '1.0.2', | ||
} | ||
description = { | ||
summary = "Module for IDE Lua debug based EmmyLua Debugger", | ||
homepage = 'https://github.com/a1div0/ide-debug', | ||
homepage = 'https://github.com/a1div0/lua-debug-helper', | ||
maintainer = "Alexander Klenov <[email protected]>", | ||
license = 'None', | ||
} | ||
|
@@ -17,9 +17,9 @@ dependencies = { | |
build = { | ||
type = 'builtin', | ||
modules = { | ||
['ide-debug'] = 'ide-debug/init.lua', | ||
['lua-debug-helper'] = 'lua-debug-helper/init.lua', | ||
}, | ||
install = { | ||
lib = {'ide-debug/emmy_core.so'}, | ||
lib = {'lua-debug-helper/emmy_core.so'}, | ||
} | ||
} |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package = 'ide-debug' | ||
package = 'lua-debug-helper' | ||
version = 'scm-1' | ||
source = { | ||
url = 'git+https://github.com/a1div0/ide-debug.git', | ||
url = 'git+https://github.com/a1div0/lua-debug-helper.git', | ||
branch = 'main', | ||
} | ||
description = { | ||
summary = "Module for IDE Lua debug based EmmyLua Debugger", | ||
homepage = 'https://github.com/a1div0/ide-debug', | ||
homepage = 'https://github.com/a1div0/lua-debug-helper', | ||
maintainer = "Alexander Klenov <[email protected]>", | ||
license = 'None', | ||
} | ||
|
@@ -16,9 +16,9 @@ dependencies = { | |
build = { | ||
type = 'builtin', | ||
modules = { | ||
['ide-debug'] = 'ide-debug/init.lua', | ||
['lua-debug-helper'] = 'lua-debug-helper/init.lua', | ||
}, | ||
install = { | ||
lib = {'ide-debug/emmy_core.so'}, | ||
lib = {'lua-debug-helper/emmy_core.so'}, | ||
} | ||
} |
File renamed without changes.
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,24 @@ | ||
local lua_debug_helper = {} | ||
|
||
lua_debug_helper.run = function(port) | ||
local dbg = require('emmy_core') | ||
dbg.tcpListen('localhost', port or 9966) | ||
dbg.waitIDE() | ||
end | ||
|
||
lua_debug_helper.enable_debugger = function(port) | ||
lua_debug_helper.run(port) | ||
end | ||
|
||
lua_debug_helper.arg_init = function(prog_args) | ||
for _, arg_i in ipairs(prog_args) do | ||
local dbg_port = arg_i:match('^--dbg_port=(%d+)$') | ||
if dbg_port ~= nil then | ||
lua_debug_helper.run(tonumber(dbg_port)) | ||
end | ||
end | ||
end | ||
|
||
lua_debug_helper.arg_init(arg) | ||
|
||
return lua_debug_helper |
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
local t = require('luatest') | ||
local g = t.group('simplest') | ||
|
||
local lua_debug_helper = require('lua-debug-helper') | ||
|
||
local launched_port = 0 | ||
lua_debug_helper.run = function(port) | ||
launched_port = port | ||
end | ||
|
||
g.test_run = function() | ||
lua_debug_helper.run(1111) | ||
t.assert_equals(launched_port, 1111) | ||
end | ||
|
||
g.test_enable_debugger = function() | ||
lua_debug_helper.enable_debugger(2222) | ||
t.assert_equals(launched_port, 2222) | ||
end | ||
|
||
g.test_arg_init = function() | ||
lua_debug_helper.arg_init{'--dbg_port=3333'} | ||
t.assert_equals(launched_port, 3333) | ||
end |