-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.02 KB
/
stylua.yml
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
name: Check Lua styling with StyLua
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
stylua:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache StyLua
uses: actions/cache@v3
with:
path: |
stylua
key: ${{ runner.os }}-stylua-${{ hashFiles('**/stylua-linux.zip') }}
restore-keys: |
${{ runner.os }}-stylua-
- name: Set up StyLua
run: |
if [ ! -f "stylua" ]; then
curl -L https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux.zip -o stylua.zip
unzip stylua.zip
chmod +x stylua
fi
- name: Check Lua files formatting
run: |
./stylua --check .
continue-on-error: false
- name: Report formatting errors (optional)
if: failure()
run: |
echo "StyLua found formatting issues."