From 5c3613b865551531ecc3fbe87206bf6e964dec52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Thu, 24 Oct 2024 16:20:00 +0200 Subject: [PATCH] Add CI configuration file * Add step to install `luarocks` using `sudo apt-get install -y luarocks` * Replace `sudo apt-get install -y stylua` with `sudo luarocks install stylua` * Replace `sudo apt-get install -y lua-language-server` with `sudo luarocks install lua-language-server` --- ci.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ci.yml diff --git a/ci.yml b/ci.yml new file mode 100644 index 0000000..2661808 --- /dev/null +++ b/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: [push, pull_request] + +jobs: + format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Luarocks + run: | + sudo apt-get update + sudo apt-get install -y luarocks + + - name: Install Stylua + run: | + sudo luarocks install stylua + + - name: Run Stylua + run: | + stylua --config-path .stylua.toml . --exclude lib/cc-tweaked + + static-analysis: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Luarocks + run: | + sudo apt-get update + sudo apt-get install -y luarocks + + - name: Install Lua-Language-Server + run: | + sudo luarocks install lua-language-server + + - name: Run Lua-Language-Server + continue-on-error: true + run: | + lua-language-server --logpath . --check . + + - name: Parse Lua-Language-Server Output + run: | + lua parse_lua_ls_output.lua ./check.json