ci(workspace): clean up lua CI logic and add placeholder scripts
This commit is contained in:
parent
f974112d2b
commit
51683c08ac
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
|
@ -34,33 +34,15 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install StyLua
|
- name: Check Lua Formatting
|
||||||
uses: JohnnyMorganz/stylua-action@v4
|
uses: JohnnyMorganz/stylua-action@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
version: latest
|
version: latest
|
||||||
|
args: --check assets/scripts/ mods/
|
||||||
|
|
||||||
- name: Check Lua Formatting
|
- name: Run Selene
|
||||||
# A conditional search is used to prevent failures when no Lua files exist yet.
|
|
||||||
run: |
|
|
||||||
LUA_FILES=$(find assets/scripts mods -name "*.lua" 2>/dev/null || true)
|
|
||||||
if [ -z "$LUA_FILES" ]; then
|
|
||||||
echo "No Lua files found to format."
|
|
||||||
else
|
|
||||||
echo "$LUA_FILES" | xargs stylua --check
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Install Selene
|
|
||||||
uses: NTBBloodbath/selene-action@v1.0.0
|
uses: NTBBloodbath/selene-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: assets/scripts/ mods/
|
||||||
- name: Run Selene
|
|
||||||
# A conditional search is used to prevent failures when no Lua files exist yet.
|
|
||||||
run: |
|
|
||||||
LUA_FILES=$(find assets/scripts mods -name "*.lua" 2>/dev/null || true)
|
|
||||||
if [ -z "$LUA_FILES" ]; then
|
|
||||||
echo "No Lua files found to lint."
|
|
||||||
else
|
|
||||||
echo "$LUA_FILES" | xargs selene
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
1
assets/scripts/core.lua
Normal file
1
assets/scripts/core.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
-- Core engine scripts
|
||||||
1
mods/example_mod/init.lua
Normal file
1
mods/example_mod/init.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
-- Example mod
|
||||||
Loading…
Reference in a new issue