Skip to content

Commit

Permalink
add mtt_filter input var to gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Apr 24, 2024
1 parent 3c6159b commit 07a930f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: test-action

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:

All parameters:
* `modname` (required) the name of the mod
* `mtt_filter` custom mods to filter for tests (`modname` is used if this is not set)
* `enable_coverage` enables coverage stats
* `enable_benchmarks` enables the benchmarks
* `git_dependencies` list of dependencies (git repositories)
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ inputs:
modname:
description: "the modname to test"
required: true
mtt_filter:
description: "list of mods to test"
required: false
default: ""
git_dependencies:
description: "list of git-dependencies to download"
required: false
Expand Down
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ then
git clone --depth=1 https://github.com/BuckarooBanzay/mtt
fi

# check for "mtt_filter" var, use modname if not set
export mtt_filter=${INPUT_MODNAME}
if [ -z "${INPUT_MTT_FILTER}" ]
then
export mtt_filter=${INPUT_MTT_FILTER}
fi

# install game
cd ${WORLDPATH}/
git clone --recurse-submodules --depth=1 ${INPUT_GIT_GAME_REPO} game
Expand All @@ -28,7 +35,7 @@ ln -s /github/workspace ${WORLDPATH}/worldmods/${INPUT_MODNAME}
# assemble minetest.conf
cat <<EOF > /minetest.conf
mg_name = ${INPUT_MAPGEN}
mtt_filter = ${INPUT_MODNAME}
mtt_filter = ${mtt_filter}
mtt_enable = true
secure.trusted_mods = mtt
EOF
Expand Down

0 comments on commit 07a930f

Please sign in to comment.