Skip to content

Commit 2e2ed33

Browse files
committed
Add CI files
1 parent 2b11971 commit 2e2ed33

File tree

2 files changed

+495
-0
lines changed

2 files changed

+495
-0
lines changed

.github/workflows/test.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: test
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.md'
7+
- 'LICENSE'
8+
9+
10+
jobs:
11+
luacheck:
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v2
17+
-
18+
name: Setup Lua
19+
uses: leafo/gh-actions-lua@v9
20+
-
21+
name: Setup Luarocks
22+
uses: leafo/gh-actions-luarocks@v4
23+
-
24+
name: Install Tools
25+
run: luarocks install luacheck
26+
-
27+
name: Run luacheck
28+
run: |
29+
luacheck .
30+
31+
test:
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
lua-version:
36+
- "5.1"
37+
- "5.2"
38+
- "5.3"
39+
- "5.4"
40+
steps:
41+
-
42+
name: Checkout
43+
uses: actions/checkout@v2
44+
with:
45+
submodules: 'true'
46+
-
47+
name: Setup Lua ${{ matrix.lua-version }}
48+
uses: leafo/gh-actions-lua@v9
49+
with:
50+
luaVersion: ${{ matrix.lua-version }}
51+
-
52+
name: Setup Luarocks
53+
uses: leafo/gh-actions-luarocks@v4
54+
-
55+
name: Install Tools
56+
run: |
57+
luarocks install testcase
58+
luarocks install luacov
59+
-
60+
name: Install
61+
run: |
62+
luarocks make
63+
-
64+
name: Run Test
65+
run: |
66+
testcase --coverage ./test/
67+
-
68+
name: Upload coverage to Codecov
69+
uses: codecov/codecov-action@v4.0.1
70+
with:
71+
token: ${{ secrets.CODECOV_TOKEN }}
72+
flags: unittests
73+

0 commit comments

Comments
 (0)