summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Orst <andreyorst@gmail.com>2020-11-01 09:20:32 +0000
committerAndrey Orst <andreyorst@gmail.com>2020-11-01 09:20:32 +0000
commitfad7b0de5bb32f29226d1295a99b232a704ae8be (patch)
treebc8a7278c8b5f8fe121091717ea87d198d982518
parent1e4afa943f108506af5221ef08d2d627e8d757be (diff)
feature(CI): add coverage report
-rw-r--r--.gitlab-ci.yml13
-rw-r--r--.luacov9
-rw-r--r--Makefile2
-rw-r--r--README.org1
4 files changed, 24 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 074ff12..9fad617 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@
stages:
- test
+ - coverage
Lua 5.3:
image: alpine:3.12.1
@@ -22,3 +23,15 @@ Lua 5.4:
- luarocks install fennel
script:
- LUA=lua5.4 make test
+
+Coverage:
+ image: alpine:3.12.1
+ stage: coverage
+ before_script:
+ - apk add lua5.3 lua5.3-dev gcc musl-dev luarocks5.3 make
+ - luarocks-5.3 install fennel
+ - luarocks-5.3 install luacov
+ - luarocks-5.3 install luacov-console
+ script:
+ - LUA=lua5.3 make luacov-console
+ - luacov-console -s
diff --git a/.luacov b/.luacov
new file mode 100644
index 0000000..8759d73
--- /dev/null
+++ b/.luacov
@@ -0,0 +1,9 @@
+-- -*- mode: lua; -*-
+-- setting default behaviors for luacov. For documentation on the options,
+-- see https://keplerproject.github.io/luacov/doc/modules/luacov.defaults.html
+
+return {
+ runreport = true,
+ statsfile = "luacov.stats.out";
+ reportfile = "luacov.report.out";
+}
diff --git a/Makefile b/Makefile
index fa4553c..7642885 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ test: clean
@fennel --lua $(LUA) core_test.fnl
@fennel --lua $(LUA) macros_test.fnl
-luacov: | clean all luacov-stats
+luacov: | clean-all all luacov-stats
luacov
luacov-console: | luacov
diff --git a/README.org b/README.org
index 7893c65..eba15f3 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,5 @@
#+title: Fennel Cljlib
+[[https://gitlab.com/andreyorst/fennel-cljlib/-/commits/master][https://gitlab.com/andreyorst/fennel-cljlib/badges/master/pipeline.svg]] [[https://gitlab.com/andreyorst/fennel-cljlib/-/commits/master][https://gitlab.com/andreyorst/fennel-cljlib/badges/master/coverage.svg]]
Experimental library for [[https://fennel-lang.org/][Fennel]] language, that adds many functions from [[https://clojure.org/][Clojure]]'s standard library.
This is not a one to one port of Clojure =core=, because many Clojure functions require certain guarantees, like immutability of the underlying data structures, or laziness.