Skip to content

ci: run lua test cases with luajit #94

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

Merged
merged 7 commits into from
Jan 13, 2022
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
21 changes: 10 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,18 @@ jobs:
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y lua5.3 lua5.3-dev
sudo ln /usr/bin/lua5.3 /usr/bin/lua
sudo apt-get install -y lua5.1 lua5.1-dev
- name: 'Install LuaRocks'
run: |
wget https://luarocks.org/releases/luarocks-3.3.0.tar.gz
tar zxpf luarocks-3.3.0.tar.gz
cd luarocks-3.3.0
wget https://luarocks.org/releases/luarocks-3.8.0.tar.gz
tar zxpf luarocks-3.8.0.tar.gz
cd luarocks-3.8.0
./configure && make && sudo make install
cd ..
- name: 'Install Dependencies'
run: |
sudo luarocks install luaunit
sudo luarocks install lua-cjson 2.1.0-1
sudo luarocks install lua-cjson2
sudo luarocks install lua-resty-jit-uuid
- name: "Install OpenResty"
run: |
Expand All @@ -77,11 +76,11 @@ jobs:
- name: 'Run Lua Tests'
run: |
cd lib
lua skywalking/util_test.lua
lua skywalking/span_test.lua
lua skywalking/tracing_context_test.lua
lua skywalking/segment_ref_test.lua
lua skywalking/correlation_context_test.lua
/usr/local/openresty-debug/luajit/bin/luajit skywalking/util_test.lua
/usr/local/openresty-debug/luajit/bin/luajit skywalking/span_test.lua
/usr/local/openresty-debug/luajit/bin/luajit skywalking/tracing_context_test.lua
/usr/local/openresty-debug/luajit/bin/luajit skywalking/segment_ref_test.lua
/usr/local/openresty-debug/luajit/bin/luajit skywalking/correlation_context_test.lua
cd ..
- name: 'Run Nginx Lua Tests'
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ All codes in the `lib/skywalking` require the `*_test.lua` to do the UnitTest. T
- LuaRocks

The following libs are required in runtime or test cases, please use `LuaRocks` to install them.
- lua-cjson. NOTICE, some platforms such as MacOS 10.15 may have issue with the latest release of this lib, consider to install an old release.(`luarocks install lua-cjson 2.1.0-1`)
- lua-cjson2. NOTICE, lua-cjson2 is to fix the bug in lua-cjson 2.1.0-1. ref to: https://github.com/apache/skywalking-nginx-lua/pull/94
- luaunit
- lua-resty-jit-uuid

Expand Down