From 44f256f395645328da90fa78db7ac50ab80e36de Mon Sep 17 00:00:00 2001 From: Rene Schallner <30892199+renerocksai@users.noreply.github.com> Date: Sun, 5 Dec 2021 00:02:19 +0100 Subject: [PATCH] Create lint.yml --- .github/workflows/lint.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..885b4cc --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: Linting and style checking + +on: [push, pull_request] + +jobs: + luacheck: + name: Luacheck + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Prepare + run: | + sudo apt-get update + sudo apt-get install -y luarocks + sudo luarocks install luacheck + + - name: Lint + run: sudo make lint + + stylua: + name: stylua + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: JohnnyMorganz/stylua-action@1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # CLI arguments + args: --color always --check lua/