From 64f2a53796d96e7124a90df71b5e6527bcb38bc1 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Sun, 29 Apr 2018 18:01:39 +0300 Subject: [PATCH] Add CI with code coverage using Travis CI and Codecov --- .luacov | 3 +++ .travis.yml | 26 ++++++++++++++++++++++++++ README.md | 3 +++ 3 files changed, 32 insertions(+) create mode 100644 .luacov create mode 100644 .travis.yml diff --git a/.luacov b/.luacov new file mode 100644 index 0000000..c5dd4c8 --- /dev/null +++ b/.luacov @@ -0,0 +1,3 @@ +modules = { + ["serpent"] = "src/serpent.lua" +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f959be9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: python +sudo: false + +env: + - LUA="lua=5.1" + - LUA="lua=5.2" + - LUA="lua=5.3" + - LUA="luajit=2.0" + - LUA="luajit=2.1" + +before_install: + - pip install codecov + - pip install hererocks + - hererocks lua_install --$LUA -r latest + - source lua_install/bin/activate + - luarocks install cluacov + +install: + - luarocks make + +script: + - lua -lluacov t/test.lua + +after_script: + - luacov + - codecov -X gcov diff --git a/README.md b/README.md index a20084d..df94728 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Serpent +[![Build Status](https://travis-ci.org/pkulchenko/serpent.svg?branch=master)](https://travis-ci.org/pkulchenko/serpent) +[![Coverage status](https://codecov.io/gh/pkulchenko/serpent/branch/master/graph/badge.svg)](https://codecov.io/gh/pkulchenko/serpent) + Lua serializer and pretty printer. ## Features