2021-07-30 18:28:48 +01:00
|
|
|
name: "CI Tests"
|
2021-07-30 18:16:43 +01:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
2021-07-30 18:22:51 +01:00
|
|
|
Syntax-Check:
|
2021-07-30 18:37:48 +01:00
|
|
|
runs-on: ubuntu-latest
|
2021-07-30 18:28:13 +01:00
|
|
|
steps:
|
2021-07-30 18:45:31 +01:00
|
|
|
# Checkout the git repo
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-07-30 18:49:05 +01:00
|
|
|
- name: Install apt dependencies
|
2021-07-30 18:47:21 +01:00
|
|
|
run: sudo apt-get --quiet install lua5.1
|
2021-07-30 18:34:53 +01:00
|
|
|
|
|
|
|
- name: uname -a
|
2021-07-30 18:32:20 +01:00
|
|
|
run: uname -a
|
2021-07-30 18:34:53 +01:00
|
|
|
|
2021-07-30 18:39:55 +01:00
|
|
|
- name: Lua version
|
|
|
|
run: lua -v
|
2021-07-30 18:34:53 +01:00
|
|
|
|
2021-07-30 18:32:20 +01:00
|
|
|
- name: Perform Check
|
2021-07-30 18:47:21 +01:00
|
|
|
run: find . -type f -name '*.lua' -not -path '*luarocks*' -not -path '*.git/*' -print0 | xargs -0 -n1 -P "$(nproc)" luac -p;
|
2021-07-30 18:22:51 +01:00
|
|
|
Busted:
|
2021-07-30 18:37:48 +01:00
|
|
|
runs-on: ubuntu-latest
|
2021-07-30 18:28:13 +01:00
|
|
|
steps:
|
2021-07-30 18:45:31 +01:00
|
|
|
# Checkout the git repo
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-07-30 18:49:05 +01:00
|
|
|
- name: Install apt dependencies
|
2021-07-30 18:47:21 +01:00
|
|
|
run: sudo apt-get --quiet install lua5.1 luarocks
|
2021-07-30 18:34:53 +01:00
|
|
|
|
|
|
|
- name: uname -a
|
2021-07-30 18:32:20 +01:00
|
|
|
run: uname -a
|
2021-07-30 18:34:53 +01:00
|
|
|
|
2021-07-30 18:39:55 +01:00
|
|
|
- name: Lua version
|
|
|
|
run: lua -v
|
2021-07-30 18:34:53 +01:00
|
|
|
|
2021-07-30 18:49:05 +01:00
|
|
|
- name: Set up tests
|
|
|
|
run: ./tests.sh run
|
|
|
|
|
2021-07-30 18:32:20 +01:00
|
|
|
- name: Run Tests
|
2021-07-30 18:47:21 +01:00
|
|
|
run: ./tests.sh run
|
2021-07-30 19:03:40 +01:00
|
|
|
LuaCheck:
|
|
|
|
runs-on: ubuntu-latest
|
2021-07-30 19:19:09 +01:00
|
|
|
steps:
|
2021-07-30 19:03:40 +01:00
|
|
|
# Checkout the git repo
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install apt dependencies
|
|
|
|
run: sudo apt-get --quiet install lua5.1 lua-check
|
|
|
|
|
|
|
|
- name: uname -a
|
|
|
|
run: uname -a
|
|
|
|
|
|
|
|
- name: Lua version
|
|
|
|
run: lua -v
|
|
|
|
|
2021-07-30 19:04:21 +01:00
|
|
|
# luacheck throws lots of errors at the moment, so don't fail the build
|
2021-07-30 19:03:40 +01:00
|
|
|
- name: Run luacheck
|
|
|
|
run: luacheck --config .tests/luacheckrc . || true
|
|
|
|
|