add integration test skeleton
This commit is contained in:
parent
4dfffdab8c
commit
de6a276f97
14
.github/workflows/test.yml
vendored
Normal file
14
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
name: test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: test
|
||||
run: docker-compose up --exit-code-from sut
|
@ -4,6 +4,13 @@ OpenSCAD inspired minetest mod
|
||||
|
||||
Status: **WIP**
|
||||
|
||||
![](https://github.com/BuckarooBanzay/mtscad/workflows/luacheck/badge.svg)
|
||||
![](https://github.com/BuckarooBanzay/mtscad/workflows/test/badge.svg)
|
||||
![](https://github.com/BuckarooBanzay/mtscad/workflows/busted/badge.svg)
|
||||
[![License](https://img.shields.io/badge/License-MIT%20and%20CC%20BY--SA%203.0-green.svg)](license.txt)
|
||||
[![Download](https://img.shields.io/badge/Download-ContentDB-blue.svg)](https://content.minetest.net/packages/BuckarooBanzay/mtscad)
|
||||
|
||||
|
||||
# Example
|
||||
|
||||
Files placed in `<worlddir>/mtscad/`
|
||||
|
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@ -0,0 +1,17 @@
|
||||
version: "3.6"
|
||||
|
||||
services:
|
||||
sut:
|
||||
image: registry.gitlab.com/minetest/minetest/server:5.4.0
|
||||
entrypoint: "minetestserver --config /minetest.conf"
|
||||
user: root
|
||||
volumes:
|
||||
- "./:/root/.minetest/worlds/world/worldmods/mtscad/"
|
||||
- "./test/mod:/root/.minetest/worlds/world/worldmods/mtscad_test/"
|
||||
- "./test/minetest.conf:/minetest.conf"
|
||||
- "world:/root/.minetest/worlds/world"
|
||||
ports:
|
||||
- "30000:30000/udp"
|
||||
|
||||
volumes:
|
||||
world: {}
|
3
test/minetest.conf
Normal file
3
test/minetest.conf
Normal file
@ -0,0 +1,3 @@
|
||||
default_game = minetest_game
|
||||
mg_name = v7
|
||||
enable_integration_test = true
|
8
test/mod/init.lua
Normal file
8
test/mod/init.lua
Normal file
@ -0,0 +1,8 @@
|
||||
-- simple smoke tests
|
||||
if minetest.settings:get_bool("enable_integration_test") then
|
||||
minetest.log("warning", "[TEST] integration-test enabled!")
|
||||
minetest.register_on_mods_loaded(function()
|
||||
-- just exit gracefully
|
||||
minetest.request_shutdown("success")
|
||||
end)
|
||||
end
|
1
test/mod/mod.conf
Normal file
1
test/mod/mod.conf
Normal file
@ -0,0 +1 @@
|
||||
depends = mtscad
|
Loading…
x
Reference in New Issue
Block a user