on: [push, pull_request]
name: build
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4

      - name: Install LuaRocks
        run: |
          sudo apt-get update -qq
          sudo apt-get install -qqq luarocks
      - name: Install pre-commit and LuaCheck
        run: |
          pip3 install pre-commit
          luarocks install --local luacheck
      - name: Run LuaCheck with pre-commit
        run: |
          pre-commit run --all-files
          $HOME/.luarocks/bin/luacheck .
