2022-03-02 17:51:55 +00:00
|
|
|
name: Linting
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
luacheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-08-10 04:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-03-02 17:51:55 +00:00
|
|
|
with:
|
|
|
|
# Subdirectory to avoid linting luarocks code. Use same dir as testy.
|
|
|
|
path: batteries
|
|
|
|
- name: Setup Lua
|
2023-08-08 03:00:29 +00:00
|
|
|
uses: leafo/gh-actions-lua@v10
|
2022-03-02 17:51:55 +00:00
|
|
|
with:
|
|
|
|
luaVersion: 5.4
|
|
|
|
- name: Setup Lua Rocks
|
|
|
|
uses: leafo/gh-actions-luarocks@v4
|
|
|
|
- name: Setup luacheck
|
|
|
|
run: luarocks install luacheck
|
|
|
|
- name: Run Code Linter
|
|
|
|
run: |
|
|
|
|
cd batteries
|
|
|
|
luacheck .
|