From ebe8c67369119b584accbb4c065a8af048c2d703 Mon Sep 17 00:00:00 2001 From: GoatGeek <82486855+GoatG33k@users.noreply.github.com> Date: Thu, 3 Jun 2021 09:16:11 -0700 Subject: [PATCH] feat: added lua linting github action (#252) --- .github/workflows/ci.yml | 25 ++++++++++++++----------- resources/client/cl_controls.lua | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a3fb32..64e4839 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: Test Suite -on: [push] +on: [push, pull_request] jobs: nui_preformatting_tests: @@ -13,11 +13,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - # Make sure the actual branch is checked out when running on pull requests - ref: ${{ github.head_ref }} - # This is important to fetch the changes to the previous commit - fetch-depth: 0 - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn config get cacheFolder)" @@ -49,11 +44,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - with: - # Make sure the actual branch is checked out when running on pull requests - ref: ${{ github.head_ref }} - # This is important to fetch the changes to the previous commit - fetch-depth: 0 - name: Use Node.js uses: actions/setup-node@v1 with: @@ -64,3 +54,16 @@ jobs: run: yarn test env: CI: true + + lint: + name: Lint Lua scripts + runs-on: ubuntu-latest + defaults: + run: + working-directory: resources + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Lint + uses: GoatG33k/fivem-lua-lint-action@v1 \ No newline at end of file diff --git a/resources/client/cl_controls.lua b/resources/client/cl_controls.lua index 6680e29..4ca80cf 100644 --- a/resources/client/cl_controls.lua +++ b/resources/client/cl_controls.lua @@ -41,4 +41,4 @@ end) AddEventHandler('npwd:disableControlActions', function(bool) disableKeys = bool -end) +end)