提交 77ba6d9e 编写于 作者: T Thibault Charbonnier

chore(ci) setup code coverage

上级 c4c676bb
t/servroot
*.lua
!bench.lua
luacov.*
......@@ -22,9 +22,13 @@ before_install:
- export PATH=$PATH:$PWD/lua_install/bin:$OPENRESTY_DIR/nginx/sbin
- eval `luarocks path`
- luarocks install luacheck
- luarocks install luacov-coveralls
install:
- luarocks make
script: make lint && make test
script:
- make lint
- make test
- luacov-coveralls -i lib/resty
cache:
cpan: true
apt: true
......
......@@ -2,6 +2,7 @@
[![Module Version][badge-version-image]][luarocks-resty-jit-uuid]
[![Build Status][badge-travis-image]][badge-travis-url]
[![Coverage Status][badge-coveralls-image]][badge-coveralls-url]
A pure LuaJIT (no dependencies) UUID library tuned for performance.
......@@ -152,4 +153,8 @@ Work licensed under the MIT License.
[badge-travis-url]: https://travis-ci.org/thibaultcha/lua-resty-jit-uuid
[badge-travis-image]: https://travis-ci.org/thibaultcha/lua-resty-jit-uuid.svg?branch=master
[badge-coveralls-url]: https://coveralls.io/r/thibaultcha/lua-resty-jit-uuid?branch=master
[badge-coveralls-image]: https://coveralls.io/repos/thibaultcha/lua-resty-jit-uuid/badge.svg?branch=master&style=flat
[badge-version-image]: https://img.shields.io/badge/version-0.0.5-blue.svg?style=flat
# vi:ts=4 sw=4 et fdm=marker:
use Test::Nginx::Socket::Lua;
use t::Util;
our $HttpConfig = <<_EOC_;
lua_package_path 'lib/?.lua;lib/?/init.lua;;';
_EOC_
our $HttpConfig = $t::Util::HttpConfig;
master_on();
workers(2);
......
# vim:set ts=4 sw=4 et fdm=marker:
use Test::Nginx::Socket::Lua;
use t::Util;
our $HttpConfig = <<_EOC_;
lua_package_path 'lib/?.lua;lib/?/init.lua;;';
_EOC_
our $HttpConfig = $t::Util::HttpConfig;
master_on();
......
# vim:set ts=4 sw=4 et fdm=marker:
use Test::Nginx::Socket::Lua;
use t::Util;
our $HttpConfig = <<_EOC_;
lua_package_path 'lib/?.lua;lib/?/init.lua;;';
_EOC_
our $HttpConfig = $t::Util::HttpConfig;
master_on();
......
# vim:set ts=4 sw=4 et fdm=marker:
use Test::Nginx::Socket::Lua;
use t::Util;
our $HttpConfig = <<_EOC_;
lua_package_path 'lib/?.lua;lib/?/init.lua;;';
_EOC_
our $HttpConfig = $t::Util::HttpConfig;
master_on();
......
# vim:set ts=4 sw=4 et fdm=marker:
use Test::Nginx::Socket::Lua;
use t::Util;
our $HttpConfig = <<_EOC_;
lua_package_path 'lib/?.lua;lib/?/init.lua;;';
_EOC_
our $HttpConfig = $t::Util::HttpConfig;
master_on();
......
package t::Util;
use strict;
use warnings;
our $HttpConfig = <<'_EOC_';
lua_package_path 'lib/?.lua;lib/?/init.lua;;';
init_by_lua_block {
runner = require 'luacov.runner'
runner.tick = true
runner.init {savestepsize = 3}
jit.off()
}
_EOC_
1;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册