-
Notifications
You must be signed in to change notification settings - Fork 70
65 lines (50 loc) · 1.41 KB
/
luacheck.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Lua Code Style and Unit Tests
on: [pull_request, workflow_dispatch]
jobs:
lua-code-style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup lua
uses: leafo/gh-actions-lua@v9
with:
luaVersion: '5.1'
- name: Setup luarock
uses: leafo/gh-actions-luarocks@v4
- name: Setup dependencies
run: |
luarocks install --lua-version=5.1 luacheck
- name: Run lint
run: |
luacheck ./ |
luacheck ./ --formatter=JUnit > report.xml
- name: Report lint
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: 'report.xml'
check_name: 'Lint Report'
lua-unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup lua
uses: leafo/gh-actions-lua@v9
with:
luaVersion: '5.1'
- name: Setup luarocks
uses: leafo/gh-actions-luarocks@v4
- name: Setup dependencies
run: |
luarocks install --lua-version=5.1 busted
- name: Run test
run: |
busted -v --run=ci --output=junit > busted.xml
- name: Report test
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: 'busted.xml'
check_name: 'Test Report'