Skip to content

ci: improved check workflow #57

ci: improved check workflow

ci: improved check workflow #57

Workflow file for this run

name: Check
on:
push:
branches:
- main
- 'renovate/**'
paths:
- .github/workflows/check.yml
- fenster-dev-1.rockspec
- 'src/**'
pull_request:
branches:
- main
paths:
- .github/workflows/check.yml
- fenster-dev-1.rockspec
- 'src/**'
workflow_dispatch:
workflow_call:
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
lua_version: [ '5.1', '5.2', '5.3', '5.4', 'luajit' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Microsoft Visual C++ Developer Command Prompt
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
# Will be ignored on non-Windows platforms anyway, but it's better to just skip it
if: matrix.os == 'windows-latest'
- name: Setup Lua
uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0
with:
luaVersion: ${{ matrix.lua_version }}
- name: Setup LuaRocks
uses: hishamhm/gh-actions-luarocks@master
- name: Build
run: luarocks make
# Currently does not work for LuaJIT on Windows (lua library not found)
if: matrix.os != 'windows-latest' || matrix.lua_version != 'luajit'
- name: Run tests
run: luarocks test -- --output=TAP
# Currently does not work for Windows (can't import 'fenster')
if: matrix.os != 'windows-latest'
# TODO: Run something like luacheck on the demos