diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml new file mode 100644 index 0000000..c9dd6f5 --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -0,0 +1,15 @@ +name: integration-test + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@master + + - name: integration-test + run: ./test/integration-test.sh diff --git a/README.md b/README.md index 9df94f9..f824c98 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ Mail mod for Minetest (ingame mod) ====== +![](https://github.com/minetest-mail/mail_mod/workflows/integration-test/badge.svg) +![](https://github.com/minetest-mail/mail_mod/workflows/luacheck/badge.svg) + + This is a fork of cheapies mail mod It adds a mail-system that allows players to send each other messages in-game and via webmail (optional) diff --git a/test/integration-test.sh b/test/integration-test.sh new file mode 100755 index 0000000..4ec5a59 --- /dev/null +++ b/test/integration-test.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +MINETEST_VERSION=5.2.0 + +# prerequisites +jq --version || exit 1 +curl --version || exit 1 + +# ensure proper current directory +CWD=$(dirname $0) +cd ${CWD} + +# setup +unset use_proxy +unset http_proxy +unset https_proxy +unset HTTP_PROXY +unset HTTPS_PROXY + +# run mail-server +docker pull minetestmail/mail +docker run --name mail --rm \ + -e WEBMAILKEY=myserverkey \ + -e WEBMAIL_DEBUG=true \ + --network host \ + minetestmail/mail & + +# wait for startup +bash -c 'while !