Used original image from tarantool repo official tarantool docker image 2.8.2
In image added useful modules:
-
luatest for testing
-
luacov to analyze test coverage
-
luacov-multiple for html report for test coverage
-
metrics for metrics
Use command to build local image:
docker build -t ma3obblu/tarantool-luatest:2.8.2 .
unit() {
echo "run unit tests"
docker run -v $(pwd):/work:rw -w /work/src ma3obblu/tarantool-luatest:2.8.2 luatest -v
}
unit_coverage(){
echo "run unit tests"
docker run -v $(pwd):/work:rw -w /work/src ma3obblu/tarantool-luatest:2.8.2 luatest --coverage
docker run -v $(pwd):/work:rw -w /work/src ma3obblu/tarantool-luatest:2.8.2 luacov .
grep -A999 '^Summary' ./src/luacov.report.out
rm -f ./src/luacov.*.out*
}