Skip to content

Commit

Permalink
Test coverage report (mt-mods#156)
Browse files Browse the repository at this point in the history
* Coverage and mineunit configuration

* Add .luacov config and install cluacov

* Add coverage badge

* Update coverage badge label

* Use mineunit-actions

* Fix working-directory

* Remove mineunit from submodules

Co-authored-by: SX <[email protected]>
  • Loading branch information
S-S-X authored Feb 18, 2021
1 parent c511e5c commit c35b61f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/busted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- name: apt
run: sudo apt-get install -y luarocks
- name: busted install
run: luarocks install --local busted
- name: busted run
working-directory: ./technic
run: $HOME/.luarocks/bin/busted

- id: mineunit
uses: mt-mods/mineunit-actions@master
with:
working-directory: ./technic
badge-label: Test coverage
- uses: RubbaBoy/[email protected]
with:
NAME: "${{ steps.mineunit.outputs.badge-name }}"
LABEL: "${{ steps.mineunit.outputs.badge-label }}"
STATUS: "${{ steps.mineunit.outputs.badge-status }}"
COLOR: "${{ steps.mineunit.outputs.badge-color }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "technic/spec/fixtures/mineunit"]
path = technic/spec/fixtures/mineunit
url = [email protected]:mt-mods/mineunit.git
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Technic
A mod for [minetest](http://www.minetest.net)

![integration-test](https://github.com/mt-mods/technic/workflows/integration-test/badge.svg)
![busted](https://github.com/mt-mods/technic/workflows/busted/badge.svg)
![luacheck](https://github.com/mt-mods/technic/workflows/luacheck/badge.svg)
![busted](https://github.com/mt-mods/technic/workflows/busted/badge.svg)
![](https://byob.yarr.is/mt-mods/technic/coverage)

[![License](https://img.shields.io/badge/license-LGPLv2.0%2B-purple.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html)
[![ContentDB](https://content.minetest.net/packages/mt-mods/technic_plus/shields/downloads/)](https://content.minetest.net/packages/mt-mods/technic_plus/)
Expand Down
2 changes: 1 addition & 1 deletion technic/spec/building_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dofile("spec/fixtures/mineunit/init.lua")
dofile("spec/mineunit/init.lua")
--[[
Technic network unit tests.
Execute busted at technic source directory.
Expand Down
1 change: 0 additions & 1 deletion technic/spec/fixtures/mineunit
Submodule mineunit deleted from 8a6486
1 change: 1 addition & 0 deletions technic/spec/mineunit.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
modname = "technic"
2 changes: 1 addition & 1 deletion technic/spec/network_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dofile("spec/fixtures/mineunit/init.lua")
dofile("spec/mineunit/init.lua")
--[[
Technic network unit tests.
Execute busted at technic source directory.
Expand Down
2 changes: 1 addition & 1 deletion technic/spec/supply_converter_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dofile("spec/fixtures/mineunit/init.lua")
dofile("spec/mineunit/init.lua")
--[[
Technic network unit tests.
Execute busted at technic source directory.
Expand Down

0 comments on commit c35b61f

Please sign in to comment.