Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Mar 23, 2023
1 parent dffe5f8 commit be73dc9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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/blockexchange/##g' coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@v1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
docs
docs
coverage
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
- "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: {}
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ minetest blockexchange mod
![](https://github.com/blockexchange/blockexchange/workflows/luacheck/badge.svg)
![](https://github.com/blockexchange/blockexchange/workflows/test/badge.svg)
![](https://github.com/blockexchange/blockexchange/workflows/ldoc/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/blockexchange/blockexchange/badge.svg?branch=main)](https://coveralls.io/github/blockexchange/blockexchange?branch=main)
[![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/blockexchange)

Expand Down
5 changes: 5 additions & 0 deletions test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ ARG ENGINE_VERSION=5.6.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 &&\
Expand Down
4 changes: 3 additions & 1 deletion test/minetest.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ default_game = minetest_game
mg_name = v7
mtt_enable = true
mtt_enable_benchmarks = true
mtt_filter = blockexchange
mtt_filter = blockexchange
mtt_enable_coverage = true
secure.trusted_mods = mtt

0 comments on commit be73dc9

Please sign in to comment.