Add simple initialization test (#15)

* Add simple initialization test

* Exclude spec from luacheck

Co-authored-by: SX <sx@minetest>
This commit is contained in:
SX 2021-02-23 14:10:13 +02:00 committed by GitHub
parent 5e22da6fdb
commit ccc26a5d80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 0 deletions

22
.github/workflows/mineunit.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: mineunit
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: mineunit
uses: mt-mods/mineunit-actions@master
with:
badge-label: Test coverage
# Uncomment to add coverage badge for regression tests
# - uses: RubbaBoy/BYOB@v1.2.0
# 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 }}

View File

@ -20,3 +20,7 @@ read_globals = {
"mesecon",
"screwdriver",
}
exclude_files = {
"**/spec/**",
}

1
spec/fixtures/digilines.lua vendored Normal file
View File

@ -0,0 +1 @@
digilines = {}

13
spec/init_spec.lua Normal file
View File

@ -0,0 +1,13 @@
require("mineunit")
mineunit("core")
fixture("digilines")
describe("Digistuff mod initialization", function()
it("will not fail", function()
sourcefile("init")
end)
end)

1
spec/mineunit.conf Normal file
View File

@ -0,0 +1 @@
modname = "digistuff"