-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (44 loc) · 1.69 KB
/
test.yaml
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
name: Linting and Tests
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build the Docker image
run: docker build .docker/alpine/ --tag vwout/obs-visca-control-test:lua-5.2
- name: Run linter
uses: addnab/docker-run-action@v3
with:
image: vwout/obs-visca-control-test:lua-5.2
options: -v ${{ github.workspace }}:/github/workspace
run: |
echo "Static luacheck libvisca.lua, obs-visca-control.lua"
luacheck --config .luacheckrc \
libvisca.lua \
obs-visca-control.lua
echo "Linting libvisca.lua, obs-visca-control.lua"
lualint -s libvisca.lua -s obs-visca-control.lua
- name: Bytecode verification
uses: addnab/docker-run-action@v3
with:
image: vwout/obs-visca-control-test:lua-5.2
options: -v ${{ github.workspace }}:/github/workspace
run: |
echo "Checking JIT bytecode for libvisca.lua"
luajit -bl libvisca.lua /dev/null
echo "Checking JIT bytecode for obs-visca-control.lua"
luajit -bl obs-visca-control.lua /dev/null
echo "Checking bytecode for libvisca.lua"
luac -p libvisca.lua
echo "Checking bytecode for obs-visca-control.lua"
luac -p obs-visca-control.lua
- name: Run unit tests
uses: addnab/docker-run-action@v3
with:
image: vwout/obs-visca-control-test:lua-5.2
options: -v ${{ github.workspace }}:/github/workspace
run: |
find test -name "*_test.lua" | xargs lunit
luacov obs-visca-control.lua libvisca.lua