-
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.72 KB
/
Copy pathlint.yml
File metadata and controls
72 lines (61 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Lint
on:
push:
branches: [main]
paths:
- '**/*.lua'
- '.luacheckrc'
- '.stylua.toml'
- '.luarc.json'
- '.github/workflows/lint.yml'
pull_request:
branches: [main]
paths:
- '**/*.lua'
- '.luacheckrc'
- '.stylua.toml'
- '.luarc.json'
- '.github/workflows/lint.yml'
workflow_dispatch:
jobs:
luacheck:
name: Luacheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Run Luacheck
uses: lunarmodules/luacheck@v1
stylua:
name: StyLua
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Run StyLua Check
run: npx @johnnymorganz/stylua-bin --check .
lls:
name: Lua Language Server
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Clone LuaCATS dependencies
run: |
mkdir -p ~/.local/share/lua/types
cd ~/.local/share/lua/types
git clone --depth 1 https://github.com/LuaCATS/busted.git
git clone --depth 1 https://github.com/LuaCATS/luassert.git
git clone --depth 1 https://github.com/LuaCATS/luafilesystem.git
- name: Install lua-language-server
run: |
LUALS_DIR="$HOME/.local/share/lua-language-server"
mkdir -p "$LUALS_DIR"
cd "$LUALS_DIR"
gh release download -R LuaLS/lua-language-server -p "*linux-x64.tar.gz" --clobber
tar -xzf *.tar.gz
echo "$LUALS_DIR/bin" >> $GITHUB_PATH
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run LLS check
run: lua-language-server --check .