Skip to content

Commit

Permalink
Split check jobs and correctly use Lua 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BreakBB committed Dec 20, 2024
1 parent e5d38ff commit 5df39c6
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:

jobs:
check:
lua-check:
runs-on: ubuntu-latest

steps:
Expand All @@ -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/[email protected]
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
Expand Down

0 comments on commit 5df39c6

Please sign in to comment.