From 5df39c65bee45e3449425fb06c6decf127a9e0a2 Mon Sep 17 00:00:00 2001 From: BreakBB Date: Fri, 20 Dec 2024 10:21:53 +0100 Subject: [PATCH] Split check jobs and correctly use Lua 5.1 --- .github/workflows/main.yml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aab5302..5f3d550 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ on: pull_request: jobs: - check: + lua-check: runs-on: ubuntu-latest steps: @@ -21,22 +21,35 @@ jobs: with: luaVersion: "5.1" - - name: Install Luarocks - uses: leafo/gh-actions-luarocks@v4 - - name: Install and run Luacheck uses: nebularg/actions-luacheck@v1 with: - files: . + files: Database Localization Modules Questie.lua args: "--no-color -q" - - name: Run Unit Tests - uses: lunarmodules/busted@v2.2.0 + unit-tests: + needs: lua-check + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Lua + uses: leafo/gh-actions-lua@v10 with: - args: -p ".test.lua" . + luaVersion: "5.1" + + - name: Install Luarocks + uses: leafo/gh-actions-luarocks@v4 + + - name: Run Unit Tests + run: | + luarocks install busted + busted -p ".test.lua" . publish: - needs: check + needs: unit-tests if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest