Skip to content

Commit 74907d6

Browse files
committed
ci: support coverage
1 parent 8502af2 commit 74907d6

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

.busted

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
return {
2+
_all = {
3+
coverage = true,
4+
},
5+
}

.github/workflows/busted.yml

+8
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ jobs:
2424

2525
- name: Run tests
2626
run: luarocks test
27+
28+
- name: Generate lcov report
29+
run: luacov
30+
31+
- name: Coveralls
32+
uses: coverallsapp/github-action@v1
33+
with:
34+
path-to-lcov: lcov.info

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
/lua_modules
44
/.luarocks
55
/*.rock
6+
/lcov.info
7+
/luacov.stats.out

.luacov

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
reporter = 'lcov'
2+
reportfile = 'lcov.info'
3+
4+
exclude = {
5+
'/usr/local/share/lua',
6+
'spec/',
7+
'.luarocks/',
8+
}

enapter-ucm-scm-1.rockspec

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies = {
2323
test_dependencies = {
2424
'busted',
2525
'luacov',
26+
'luacov-reporter-lcov',
2627
'inspect',
2728
}
2829

0 commit comments

Comments
 (0)