fix stamina multiplier #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lua syntax check, lint, and format | |
on: | |
push: | |
branches: | |
- main | |
- v* | |
paths: | |
- .github/workflows/lua-check.yml | |
- config.lua.dist | |
- "data/**.lua" | |
pull_request: | |
paths: | |
- .github/workflows/lua-check.yml | |
- config.lua.dist | |
- "data/**.lua" | |
jobs: | |
luac: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: leafo/gh-actions-lua@v10 | |
with: | |
luaVersion: "5.4" | |
- name: Test Lua syntax | |
run: find data/ -name '*.lua' -print0 | xargs -0 -n1 luac -p | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: leafo/gh-actions-lua@v10 | |
- uses: leafo/gh-actions-luarocks@v4 | |
- name: Install Luacheck | |
run: luarocks install luacheck | |
- name: Run Luacheck | |
run: luacheck data config.lua.dist || true | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: leafo/gh-actions-lua@v10 | |
- uses: leafo/gh-actions-luarocks@v4 | |
- name: Install LuaFormatter | |
run: luarocks install --server=https://luarocks.org/dev luaformatter | |
- name: Run LuaFormatter | |
run: | | |
find . -regex ".*\.lua.*" -exec luaformatter -i {} \; | |
git diff --exit-code |