Skip to content

improvement: enable custom duration and simplify expiration calculation #658

improvement: enable custom duration and simplify expiration calculation

improvement: enable custom duration and simplify expiration calculation #658

Workflow file for this run

name: Lua syntax check, lint, and format
on:
push:
branches:
- master
- 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@v4
- 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@v4
- 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@v4
- 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