From 0a69d674eac8c538b6a121beb2125aded47dc11c Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Thu, 18 Apr 2024 13:33:24 +0200 Subject: [PATCH] mtt coverage --- .github/workflows/coverage.yml | 18 ------------------ .github/workflows/test.yml | 8 ++++++-- docker-compose.yml | 18 ------------------ test/Dockerfile | 14 -------------- test/minetest.conf | 7 ------- test/world.mt | 9 --------- 6 files changed, 6 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/coverage.yml delete mode 100644 docker-compose.yml delete mode 100644 test/Dockerfile delete mode 100644 test/minetest.conf delete mode 100644 test/world.mt diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 0715cf4..0000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: coverage - -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 - sudo sed -i 's#/root/.minetest/worlds/world/worldmods/promise/##g' coverage/lcov.info - - name: Coveralls - uses: coverallsapp/github-action@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb4b5e5..492d0de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test-action +name: test on: [push, pull_request] @@ -11,5 +11,9 @@ jobs: - uses: buckaroobanzay/mtt@main with: modname: promise + enable_coverage: "true" git_dependencies: | - https://github.com/BuckarooBanzay/mtt \ No newline at end of file + https://github.com/BuckarooBanzay/mtt + additional_config: | + secure.http_mods = promise + - uses: coverallsapp/github-action@v1 diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 1268432..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: "3.6" - -services: - sut: - build: - context: ./test - args: - ENGINE_VERSION: ${ENGINE_VERSION:-5.7.0} - user: root - volumes: - - "./:/root/.minetest/worlds/world/worldmods/promise/" - - "world_data:/root/.minetest/worlds/world" - - "./test/world.mt:/root/.minetest/worlds/world/world.mt" - - "./test/minetest.conf:/minetest.conf" - - "./coverage:/var/lib/minetest" - -volumes: - world_data: {} \ No newline at end of file diff --git a/test/Dockerfile b/test/Dockerfile deleted file mode 100644 index e46213f..0000000 --- a/test/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG ENGINE_VERSION=5.7.0 -FROM registry.gitlab.com/minetest/minetest/server:${ENGINE_VERSION} - -USER root - -RUN apk add --no-cache lua-dev luarocks &&\ - luarocks-5.1 install luacov &&\ - luarocks-5.1 install luacov-reporter-lcov - -RUN apk add git &&\ - mkdir -p /root/.minetest/worlds/world/worldmods/ &&\ - git clone https://github.com/BuckarooBanzay/mtt /root/.minetest/worlds/world/worldmods/mtt - -ENTRYPOINT minetestserver --config /minetest.conf \ No newline at end of file diff --git a/test/minetest.conf b/test/minetest.conf deleted file mode 100644 index 15d683f..0000000 --- a/test/minetest.conf +++ /dev/null @@ -1,7 +0,0 @@ -default_game = minetest_game -mg_name = v7 -mtt_enable = true -mtt_filter = promise -mtt_enable_coverage = true -secure.trusted_mods = mtt -secure.http_mods = promise \ No newline at end of file diff --git a/test/world.mt b/test/world.mt deleted file mode 100644 index 22c55ea..0000000 --- a/test/world.mt +++ /dev/null @@ -1,9 +0,0 @@ -enable_damage = false -creative_mode = true -mod_storage_backend = sqlite3 -auth_backend = sqlite3 -player_backend = dummy -backend = dummy -gameid = minetest -world_name = world -server_announce = false